# Delete everything

**URL:** <https://discuss.elastic.co/t/delete-everything/107861>\
**Category:** Elasticsearch\
**Created:** [November 16, 2017, 5:32am UTC](https://discuss.elastic.co/t/delete-everything/107861 "2017-11-16T05:32:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)\
**Post date:** [November 16, 2017, 5:32am UTC](https://discuss.elastic.co/t/delete-everything/107861/1 "2017-11-16T05:32:42Z")

</div>

Hi,

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?

Thanks

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [November 16, 2017, 5:50am UTC](https://discuss.elastic.co/t/delete-everything/107861/2 "2017-11-16T05:50:14Z")

</div>

Hi, yes, you can delete with this command all indices as described on:  
[https://www.elastic.co/guide/en/elasticsearch/reference/5.6/indices-delete-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/indices-delete-index.html)  
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
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 16, 2017, 7:47am UTC](https://discuss.elastic.co/t/delete-everything/107861/3 "2017-11-16T07:47:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)\
**Post date:** [November 16, 2017, 8:00am UTC](https://discuss.elastic.co/t/delete-everything/107861/4 "2017-11-16T08:00:06Z")

</div>

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

Regards

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 16, 2017, 8:59am UTC](https://discuss.elastic.co/t/delete-everything/107861/5 "2017-11-16T08:59:21Z")

</div>

```
rm -r /path/to/data
```

---

<div class="post-metadata">

**Author:** ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)\
**Post date:** [November 16, 2017, 9:11am UTC](https://discuss.elastic.co/t/delete-everything/107861/6 "2017-11-16T09:11:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 16, 2017, 9:42am UTC](https://discuss.elastic.co/t/delete-everything/107861/7 "2017-11-16T09:42:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wkpv68](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wkpv68](https://discuss.elastic.co/u/wkpv68)\
**Post date:** [November 16, 2017, 9:58am UTC](https://discuss.elastic.co/t/delete-everything/107861/8 "2017-11-16T09:58:38Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 14, 2017, 9:59am UTC](https://discuss.elastic.co/t/delete-everything/107861/9 "2017-12-14T09:59:08Z")

</div>

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