Removing MongoDB from Ubuntu

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

Answer

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

Attribution
Source : Link , Question Author : w3rthl3ss , Answer Author : John

Leave a Comment