Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save govindpatel/0660b33a343b807664972b53c3b12ca0 to your computer and use it in GitHub Desktop.
Save govindpatel/0660b33a343b807664972b53c3b12ca0 to your computer and use it in GitHub Desktop.
Mac uninstall elasticsearch / install
#!/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 -f ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
brew uninstall elasticsearch
# double check existence
ls -al /usr/local/bin/elasticsearch*
ls -al ~/Library/LaunchAgents
# remove the data folder for elasticsearch
# to list the location of data
brew info elasticsearch
#install
brew search elasticsearch
#installing elasticsearch17
brew install homebrew/versions/elasticsearch17
@dbackeus
Copy link

dbackeus commented May 2, 2019

Thanks bro, saved my life today!

@chakiri
Copy link

chakiri commented Oct 16, 2019

very useful 👍

@sxfmol
Copy link

sxfmol commented Jun 29, 2020

Useful,tks

@fabiobarboza7
Copy link

+1 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment