[Mac] Homebrew でインストールした Elasticsearch を完全にアンインストールする

MacOS のパッケージマネージャー Homebrew で install した Elasticsearch を完全に uninstall する手順をご紹介します。

Elasticsearch | エラスティックサーチ

Elasticsearch 停止&アンインストール

まず、Elasticsearch のプロセスを停止します。

brew services stop elasticsearch@2.4

次に、Elasticsearch をアンインストールします。

brew uninstall --force elasticsearch@2.4

Elasticsearch データ&ログファイル削除

最後に、Elasticsearch が利用していたデータと log ファイルなどが置いてあるディレクトリを丸ごと削除します。

rm -rf /usr/local/var/elasticsearch
rm -rf /usr/local/var/log/elasticsearch*

以上、Elasticsearch を Homebrew ではなく Docker で管理していきたい、現場からお送りしました。