Michael Käfer
Michael Käfer

Reputation: 1786

Completly deinstall and remove Elasticsearch for complete restart and begin new

After experimenting with Elasticsearch I'm searching for a way to completely remove everything concerning Elasticsearch on my server. I made quite a few mistakes and want to start completely new with a new installation.

Upvotes: 6

Views: 15747

Answers (2)

akshit bhatia
akshit bhatia

Reputation: 395

use the following command to know the pid of the node already running.

curl -XGET 'http://localhost:9200/_nodes/process'

It took me an hour to find out the way to kill the node and could finally do it after using this command in the terminal window.

**For Linux users:

kill -9 {pid}

** will terminate the elasticsearch from the RAM. And then you can delete as the other answers suggest.

Upvotes: -1

Simply find the Java process that Elasticsearch is in and kill, or use curl -XPOST /*Your Ip*/:9200/_shutdown.

Then remove Elasticsearch from your system by simply deleting the ES files/folder.

Various different setups could require different deletion methods (linux use rm -rf ES dirs, windows the good ol' delete button will work, logstash may require additional steps) but as a general rule it's quite simply to remove.

If you wish to remove only the data you can delete the data dir, or wipe all your indexes and reindex.

Upvotes: 2

Related Questions