Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!


share|improve this question
up vote 2 down vote accepted

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

share|improve this answer
Removed those files, re-installed Mongo, got this message when trying to enter the shell - Error: couldn't connect to server 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.