# Delete all documents of certain type across all indices

**URL:** <https://discuss.elastic.co/t/delete-all-documents-of-certain-type-across-all-indices/93072>\
**Category:** Elasticsearch\
**Created:** [July 13, 2017, 7:36pm UTC](https://discuss.elastic.co/t/delete-all-documents-of-certain-type-across-all-indices/93072 "2017-07-13T19:36:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Clarke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_clarke/32/87948_2.png) [@Mike\_Clarke](https://discuss.elastic.co/u/Mike_Clarke)\
**Post date:** [July 13, 2017, 7:36pm UTC](https://discuss.elastic.co/t/delete-all-documents-of-certain-type-across-all-indices/93072/1 "2017-07-13T19:36:04Z")

</div>

I have daily indices that each contain documents with a `type` of either `audit, state, or pass`. How can I delete all documents with type `audit` from each of the indices? I have tried numerous ways that are all unsuccessful.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [July 13, 2017, 7:47pm UTC](https://discuss.elastic.co/t/delete-all-documents-of-certain-type-across-all-indices/93072/2 "2017-07-13T19:47:50Z")

</div>

The delete\_by\_query plugin should do that for you.

---

<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:** [August 10, 2017, 7:48pm UTC](https://discuss.elastic.co/t/delete-all-documents-of-certain-type-across-all-indices/93072/3 "2017-08-10T19:48:13Z")

</div>

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