Skip to content

Instantly share code, notes, and snippets.

@mkocikowski
Last active August 29, 2015 14:23
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 mkocikowski/37114a5232bd3fa2d145 to your computer and use it in GitHub Desktop.
Save mkocikowski/37114a5232bd3fa2d145 to your computer and use it in GitHub Desktop.
Delete all closed indexes from Elasticsearch cluster
curl -s 'localhost:9200/_cat/indices' | grep close | awk '{ printf "http://localhost:9200/%s\n", $2 }' | xargs -n 1 curl -i -XDELETE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment