# How to delete old indices automatically in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643>\
**Category:** Kibana\
**Created:** [January 6, 2022, 11:35am UTC](https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643 "2022-01-06T11:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharunkumar](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@tharunkumar](https://discuss.elastic.co/u/tharunkumar)\
**Post date:** [January 6, 2022, 11:35am UTC](https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643/1 "2022-01-06T11:35:38Z")

</div>

Hi i need clear solution how can i delete the old indices data automatically after a period of time.thank you

---

<div class="post-metadata">

**Author:** ![can.ozdemir](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@can.ozdemir](https://discuss.elastic.co/u/can.ozdemir)\
**Post date:** [January 6, 2022, 12:42pm UTC](https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643/2 "2022-01-06T12:42:43Z")

</div>

This is done with Index Lifecycle Management;

[Elasticsearch 7.16 ILM](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)

---

<div class="post-metadata">

**Author:** ![tharunkumar](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@tharunkumar](https://discuss.elastic.co/u/tharunkumar)\
**Post date:** [January 6, 2022, 1:10pm UTC](https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643/3 "2022-01-06T13:10:34Z")

</div>

thanks for ur reply.  
can u provide me details steps how to setup policy to delete indices on time based from index lifecycle management.it will be more helpfull to me

---

<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 3, 2022, 1:11pm UTC](https://discuss.elastic.co/t/how-to-delete-old-indices-automatically-in-elasticsearch/293643/4 "2022-02-03T13:11:08Z")

</div>

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