MongoDB – Uninstall:

Stop the MongoDB server

sudo service mongod stop

Remove packages installed

sudo yum erase $( rpm -qa | grep mongodb-org )

Check the status MongoDB server

sudo service mongod status

Remove Database and log Directories

sudorm -r /var/log/mongodb
sudorm -r /var/lib/mongo