Created
October 10, 2017 19:29
-
-
Save bhagatparwinder/1dd557f26bd0cc13ffa3c134fecb0e5e to your computer and use it in GitHub Desktop.
Remove mongodb that was installed by brew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep mongo | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
launchctl remove homebrew.mxcl.mongodb | |
pkill -f mongod | |
rm -f ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
brew uninstall mongodb | |
# double check existence | |
ls -al /usr/local/bin/mong* | |
ls -al ~/Library/LaunchAgents | |
# remove additonal directories | |
rm -rf /usr/local/var/mongodb | |
rm -r /data/db/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment