Last active
December 30, 2015 23:32
-
-
Save forbesmyester/51846f5740f321829710 to your computer and use it in GitHub Desktop.
Bash to remove all ES indices
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?v' | awk '{ print $3 }' | grep -v '^\.' | tr '\n' '\0' | xargs -n 1 -0 -I {} curl -X DELETE "http://localhost:9200/{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment