# Questions on how to delete by query in ElasticSearch

**URL:** <https://discuss.elastic.co/t/questions-on-how-to-delete-by-query-in-elasticsearch/55349>\
**Category:** Elasticsearch\
**Created:** [July 12, 2016, 8:13pm UTC](https://discuss.elastic.co/t/questions-on-how-to-delete-by-query-in-elasticsearch/55349 "2016-07-12T20:13:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dadepo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadepo/32/19944_2.png) [@dadepo](https://discuss.elastic.co/u/dadepo)\
**Post date:** [July 12, 2016, 8:13pm UTC](https://discuss.elastic.co/t/questions-on-how-to-delete-by-query-in-elasticsearch/55349/1 "2016-07-12T20:13:26Z")

</div>

I would like to delete certain documents in my index based on certain criteria, and I am just learning that in other to get this done, I would need to install the `Delete By Query` plugin. Atleast that is what this page: [https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html) says.

Is there any other way to get the same thing done without going the plugin route? Because, sincerely the whole plugin business feels like an hassle. It hurts the "Developer experience". **I mean, it is like having to install a plugin on Mysql in other to be able to execute a delete statement with a where clause!**

Not only do I need to install the plugin, I have to install it on all nodes in my cluster! Then restart!...

I am also reading online that the plugin related changes also renders NodeBuilder useless.

So is there any other way to delete based on which documents match certain query? I hope there is. Your suggestions would be appreciated!

---

<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:** [July 13, 2016, 8:52am UTC](https://discuss.elastic.co/t/questions-on-how-to-delete-by-query-in-elasticsearch/55349/2 "2016-07-13T08:52:30Z")

</div>

It changes in 5.0: [https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-delete-by-query.html)

---

<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:** [July 5, 2017, 10:36pm UTC](https://discuss.elastic.co/t/questions-on-how-to-delete-by-query-in-elasticsearch/55349/3 "2017-07-05T22:36:08Z")

</div>


