# Can't delete all files elasticsearch

**URL:** <https://discuss.elastic.co/t/cant-delete-all-files-elasticsearch/214413>\
**Category:** Elasticsearch\
**Created:** [January 9, 2020, 10:26am UTC](https://discuss.elastic.co/t/cant-delete-all-files-elasticsearch/214413 "2020-01-09T10:26:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramon\_Mateo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramon_mateo/32/46306_2.png) [@Ramon\_Mateo](https://discuss.elastic.co/u/Ramon_Mateo)\
**Post date:** [January 9, 2020, 10:26am UTC](https://discuss.elastic.co/t/cant-delete-all-files-elasticsearch/214413/1 "2020-01-09T10:26:50Z")

</div>

Hi

I keep trying to delete specific data in an index. My problem is that I have many files in the same index. When I try to delete by query the answer of the query is that it can delete some files but it cannot delete everything because the index returns to the read-only / allo delete (api).

How can I do to remove all the data I want before read\_only\_allow\_delete = false, finish the time and remove the permission again?

Thanks for advanced

---

<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:** [January 9, 2020, 12:42pm UTC](https://discuss.elastic.co/t/cant-delete-all-files-elasticsearch/214413/2 "2020-01-09T12:42:06Z")

</div>

It's definitely better to just drop the whole index.

---

<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:** [February 6, 2020, 12:42pm UTC](https://discuss.elastic.co/t/cant-delete-all-files-elasticsearch/214413/3 "2020-02-06T12:42:10Z")

</div>

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