17

I am running the following command:

sudo apt-get remove mongodb

And it's giving this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'mongodb' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But mongodb is still installed on my Ubuntu 13.04 system, so how can I uninstall it..?

2
  • 1
    How did you install it?
    – Mitch
    Jul 13 '14 at 7:54
  • what's the output of locate mongodb?
    – yuvi
    Jul 13 '14 at 7:55
39

Try searching for installed mongo packages with dpkg :

$ sudo dpkg -l | grep mongo

The above command should output a list of packages with mongo in the name.

If files exist on the system, following an apt-get remove mongo, try and run the command again with the --purge switch, using a wildcard search for the name:

sudo apt-get remove mongodb* --purge
4

The general methodology here should work (upvoted), but more specifically the MongoDB packages for 2.6+ (assuming you installed them from the official repos) are:

  • mongodb-org (metapackage that will automatically install/remove) the four component packages below
  • mongodb-org-server
  • mongodb-org-client
  • mongodb-org-tools
  • mongodb-org-shell

Hence, if you try removing those packages you should have more success.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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