Skip to content

Instantly share code, notes, and snippets.

@forbesmyester
Last active December 30, 2015 23:32
Show Gist options
  • Save forbesmyester/51846f5740f321829710 to your computer and use it in GitHub Desktop.
Save forbesmyester/51846f5740f321829710 to your computer and use it in GitHub Desktop.
Bash to remove all ES indices
#!/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