Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

When I try to run mongod from the terminal, I get the following error:

2014-07-02T23:56:24.797-0700 [initandlisten] ERROR: listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017 2014-07-02T23:56:24.797-0700 [initandlisten] ERROR: address already in use

I recently realize that I have two versions of MongoDB on my Mac, and think this may be the source for the above error. (Plus, I do not need two versions.) I tried Googling but was not able to find clear directions on how I can uninstall. I have development version 2.7.0 AND 2.6.3.

Thanks so much in advance for the help!

1 Answer

0 votes
by (106k points)

To uninstall MongoDB on Mac OS X you should run the following commands to remove mongodb from the launch/startup and to uninstall it using Homebrew:

launchctl list | grep mongo 

launchctl remove homebrew.mxcl.mongodb 

pkill -f mongod 

brew uninstall mongodb

And just double-checks in /usr/local/bin/ to make sure that the mongodb commands are removed.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
asked Oct 16, 2019 in Web Technology by Sammy (47.6k points)
0 votes
1 answer
asked Dec 20, 2020 in SQL by Appu (6.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...