Skip to content

Instantly share code, notes, and snippets.

@tyagiakhilesh
Last active January 20, 2020 17:08
Show Gist options
  • Save tyagiakhilesh/b8d1916ad6cbdb74daf3e67a24bff643 to your computer and use it in GitHub Desktop.
Save tyagiakhilesh/b8d1916ad6cbdb74daf3e67a24bff643 to your computer and use it in GitHub Desktop.
Delete All indices from elastic search.
#!/bin/bash
(curl -s -XGET 'http://10.160.0.37:9200/_cat/indices/?pretty' ) | awk '{print $3}' | egrep 'stage*|.kibana'| while read -r line; do curl -XDELETE http://10.160.0.37:9200/"${line}";done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment