# Elasticsearch delete data for more than 2 mohts in multiple index

**URL:** <https://discuss.elastic.co/t/elasticsearch-delete-data-for-more-than-2-mohts-in-multiple-index/311144>\
**Category:** Elasticsearch\
**Created:** [August 1, 2022, 4:11pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-data-for-more-than-2-mohts-in-multiple-index/311144 "2022-08-01T16:11:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![navin1093](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@navin1093](https://discuss.elastic.co/u/navin1093)\
**Post date:** [August 1, 2022, 4:11pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-data-for-more-than-2-mohts-in-multiple-index/311144/1 "2022-08-01T16:11:21Z")

</div>

Hi friends, I have 3 index. how can i delete data form these index if it is more than 2 months. I know can use ILM policy but my index is created from elastalert whereby i cant use ILM policy as it wont append timestamp-version. therefore i need manually delete . Can we use curl for this?

---

<div class="post-metadata">

**Author:** ![Ugo\_Sangiorgi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ugo_sangiorgi/32/146361_2.png) [@Ugo\_Sangiorgi](https://discuss.elastic.co/u/Ugo_Sangiorgi)\
**Post date:** [August 1, 2022, 4:44pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-data-for-more-than-2-mohts-in-multiple-index/311144/2 "2022-08-01T16:44:19Z")

</div>

In this case your only option would be to use the [Delete by Query API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-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:** [August 29, 2022, 4:44pm UTC](https://discuss.elastic.co/t/elasticsearch-delete-data-for-more-than-2-mohts-in-multiple-index/311144/3 "2022-08-29T16:44:47Z")

</div>

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