Skip to content

Instantly share code, notes, and snippets.

@xcsrz
Created November 13, 2021 22:13
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 xcsrz/bed2d2d5cf0523462a5bb4c2dead1aab to your computer and use it in GitHub Desktop.
Save xcsrz/bed2d2d5cf0523462a5bb4c2dead1aab to your computer and use it in GitHub Desktop.
Sometimes you just need to delete everything in an elasticsearch cluster and you don't have access to do the stop-rm-rf-start thing.
for idx in $(curl -sS https://${DOMAIN}:${PORT}/_cat/indices | awk '{print $3}'); do curl -XDELETE "https://${DOMAIN}:${PORT}/${idx}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment