0 votes
1 view
in AWS by (19.2k 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.6k points)

1. Stop Mongo DB service:

sudo service mongod stop

2. Remove Packages using this:

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

-OR-

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

3. Remove Data Directories:

sudo rm -r /var/log/mongodb

sudo rm -r /var/lib/mongo

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...