# ES version 2.1.1 - How to delete the oldest data sitting in the ES index

**URL:** https://discuss.elastic.co/t/es-version-2-1-1-how-to-delete-the-oldest-data-sitting-in-the-es-index/166781
**Category:** Elasticsearch
**Created:** [February 1, 2019, 8:20pm UTC](https://discuss.elastic.co/t/es-version-2-1-1-how-to-delete-the-oldest-data-sitting-in-the-es-index/166781 "2019-02-01T20:20:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Neni](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@Neni](https://discuss.elastic.co/u/Neni)
#### Post date: [February 1, 2019, 8:20pm UTC](https://discuss.elastic.co/t/es-version-2-1-1-how-to-delete-the-oldest-data-sitting-in-the-es-index/166781/1 "2019-02-01T20:20:19Z")

</div>

Could you please let me know the best options to delete the oldest data /documents that was created 2 to 3 years ago and the data is still in ES index.

Thank you.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 3, 2019, 1:49am UTC](https://discuss.elastic.co/t/es-version-2-1-1-how-to-delete-the-oldest-data-sitting-in-the-es-index/166781/2 "2019-02-03T01:49:11Z")

</div>

Delete by query is your only/best option, see [https://www.elastic.co/guide/en/elasticsearch/plugins/2.1/delete-by-query-usage.html](https://www.elastic.co/guide/en/elasticsearch/plugins/2.1/delete-by-query-usage.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: [March 3, 2019, 1:49am UTC](https://discuss.elastic.co/t/es-version-2-1-1-how-to-delete-the-oldest-data-sitting-in-the-es-index/166781/3 "2019-03-03T01:49:18Z")

</div>

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