Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osazemeu/4bdf00813d6bc1b31116150231cb69f2 to your computer and use it in GitHub Desktop.
Save osazemeu/4bdf00813d6bc1b31116150231cb69f2 to your computer and use it in GitHub Desktop.
Mac uninstall elasticsearch
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch
rm -rf ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
rm -rf /usr/local/var/lib/elasticsearch/
rm -rf /usr/local/var/log/elasticsearch/elasticsearch_osazemeusen.log
rm -rf /usr/local/var/elasticsearch/plugins/
rm -rf /usr/local/etc/elasticsearch/
brew uninstall elasticsearch
# double check existence
ls -al /usr/local/bin/elasticsearch*
ls -al ~/Library/LaunchAgents
brew tap elastic/tap
brew install elastic/tap/elasticsearch-full
brew install elastic/tap/kibana-full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment