Cleanup ElasticSearch Indexes

Cleanup ElasticSearch Indexes

Sander van de Graaf

Sander van de Graaf

Sometimes, you just want to cleanup old ElasticSearch indexes, especially logstash indexes can become quite numerous.

Deleting everything from a certain month:

curl -XDELETE http://127.0.0.1:9200/logstash-2016.6.[1-30]

Or multiple months:

curl -XDELETE http://127.0.0.1:9200/logstash-2016.[1-6].[1-30]
Sander van de Graaf
Sander van de Graaf