Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I am having trouble uninstalling mongo from a 64 bit EC2. In /usr/bin I have mongo and MongoDB amongst others. When I type mongo from anywhere it opens the shell at version 1.8. I now downloaded 2.0.2 and in that folder when I run mongo it opens up version 2.0.2

My question is how do I purge mongo fully so I can install 2.0.2 without coming across the old 1.8 version?

1 Answer

0 votes
by (44.4k points)

1. Stop Mongo DB service:

sudo service mongod stop

2. Remove Packages using this:

sudo yum erase mongo-10gen mongo-10gen-server  


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

3. Remove Data Directories:

sudo rm -r /var/log/mongodb

sudo rm -r /var/lib/mongo

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories