Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created August 10, 2016 21:36
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save diegopacheco/58fd31e442f04a44d49498ec785c1f27 to your computer and use it in GitHub Desktop.
Save diegopacheco/58fd31e442f04a44d49498ec785c1f27 to your computer and use it in GitHub Desktop.
How to Delete All Data in Elasticsearch?
curl -XDELETE localhost:9200/*
@Roy-Orbison
Copy link

@tosto92 if you can afford to wipe out the structure too, then

  1. stop elastic service
  2. rename data dir (append a ~) usually in /var/lib/elasticsearch
  3. start service
  4. recreate indices
  5. repopulate with data

If it goes bad, just revert the rename in the same manner.

@patelvp
Copy link

patelvp commented Sep 23, 2020

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment