Delete everything


I want to upgrade to 6.0 from 5.6.4 and I want to start from clean environment (delete all).

How can I delete everything?
Does curl -XDELETE localhost:9200/* command will do it?


Hi, yes, you can delete with this command all indices as described on:
but in your elasticsearch settings file "/elasticsearch_path/config/elasticsearch.yml" may be setted some params which block delete all action:

// Protect against accidental close/delete operations
//on all indices. You can still close/delete individual
// indices
action.disable_close_all_indices: true
action.disable_delete_all_indices: true
action.disable_shutdown: true

If you really want to start from scratch (including licenses...) you can also remove the data dir.

1 Like

How to delete the data dir?
Could you write the command?


rm -r /path/to/data
1 Like

I'm using Windows without installation, I download the zip file

So I don’t understand why you’re speaking of « upgrade » here.
It’s just a normal installation then?

I have some problem to upgrade from 5.6 to 6.0.
I got 403 errir so I'm trying to delete everything and run 6.0.

It is look like @nugusbayevkk suggestions with
curl -XDELETE localhost:9200/
solved the issue


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.