Skip to content

Instantly share code, notes, and snippets.

@rxx
Forked from katychuang/remove_brew-mongo_osx.sh
Last active March 4, 2020 08:59
Show Gist options
  • Save rxx/c68cc7881d6367ce892f0d19c75da818 to your computer and use it in GitHub Desktop.
Save rxx/c68cc7881d6367ce892f0d19c75da818 to your computer and use it in GitHub Desktop.
remove mongodb that was installed via brew
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
launchctl remove homebrew.mxcl.mongodb-community
pkill -f mongod
rm -f ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
brew uninstall mongodb-community
# double check existence
ls -al /usr/local/bin/mong*
ls -al ~/Library/LaunchAgents
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment