sudo apt-get purge mongodb-org*
//To uninstall mongodb.
sudo apt-get purge mongodb-org*
//To remove mongodb Completely.
sudo apt-get install mongodb-org --fix-missing --fix-broken
sudo apt-get autoremove mongodb-org --fix-missing --fix-broken
sudo apt-get install mongodb-org --fix-missing --fix-broken
sudo apt-get autoremove mongodb-org --fix-missing --fix-broken
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
sudo yum erase $(rpm -qa | grep mongodb-enterprise)