0

I recently started to mess with setting up ReplicaSets. After some testing and playing, I was wanting to remove MongoDB and all settings, and start with a fresh install on all systems to get it set-up for production mode. I assumed sudo apt-get --purge remove mongodb mongodb-clients mongodb-server mongodb-dev mongodb-10gen followed by sudo apt-get autoremove would take care and I could just start again with install. The problem is, when I do the fresh install, start up the Mongo Shell, it automatically starts me back up as if I was in my development mode ReplicaSets? I have removed my .confs and mongodb directory from /var/lib/ but that still does not take care of it. During the install, I get the prompt (Reading database ... 76829 files and directories currently installed.) Where are these? I do a sudo dpkg -L mongodb-10gen and get that it is not installed?

Any advice to help me avoid a complete Ubuntu re-install would be very helpful. Thanks in advance for any guidance given!

Nathan

w3rthl3ss
  • 135
  • 2
  • 7

1 Answers1

2

Check the mongodb.conf file and see what dbpath is set for and then remove the db files.

John
  • 567
  • 2
  • 4
  • Removed those files, re-installed Mongo, got this message when trying to enter the shell - `Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91` – w3rthl3ss Apr 19 '13 at 19:19
  • Is mongo up and running? – John Apr 19 '13 at 19:25
  • Yeah, it is running. And working now, oddly enough. Tried to enter the shell again after looking at that `mongo.js` file and everything is good. Thanks! – w3rthl3ss Apr 19 '13 at 19:27
  • May have been initializing/starting. – John Apr 19 '13 at 19:41