Last active
September 15, 2016 08:03
-
-
Save mpangrazzi/eb58de6a47ad62c5b79b210cdedcaa2e to your computer and use it in GitHub Desktop.
Delete all indexes in ElasticSearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl 'localhost:9200/_cat/indices/' | awk '{ print $3 }' | xargs -I % curl -XDELETE 'localhost:9200/%' | |
# - useful if you can't delete using a wildcard | |
# - `xargs` can be swapped with `GNU parallel` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment