Skip to content

Instantly share code, notes, and snippets.

@dakala
Created April 15, 2018 21:13
Show Gist options
  • Save dakala/33e4c8837dd330c8c889f6ea9c2b6066 to your computer and use it in GitHub Desktop.
Save dakala/33e4c8837dd330c8c889f6ea9c2b6066 to your computer and use it in GitHub Desktop.
Clean uninstall of mongo db
#!/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
rm -rf /usr/local/var/mongodb
rm -rf /data
# 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