# Automatic deletion of indices older than 3 months in elastic search

**URL:** https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [March 22, 2021, 8:20am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957 "2021-03-22T08:20:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Deepz](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Deepz](https://discuss.elastic.co/u/Deepz)
#### Post date: [March 22, 2021, 8:20am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/1 "2021-03-22T08:20:07Z")

</div>

Hi..  
Could someone help me on how to automate the deletion the indices that are older than 3 months old.  
(Without curator)

---

<div class="post-metadata">

### Author: ![Deepz](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Deepz](https://discuss.elastic.co/u/Deepz)
#### Post date: [March 22, 2021, 8:20am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/2 "2021-03-22T08:20:42Z")

</div>

Hi @dadoonet  
Could you kindly help

---

<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: [March 22, 2021, 8:43am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/3 "2021-03-22T08:43:36Z")

</div>

Welcome.

Please be patient in waiting for responses to your question and refrain from pinging multiple times asking for a response or opening multiple topics for the same question. This is a community forum, it may take time for someone to reply to your question. For more information please refer to the [Community Code of Conduct](https://www.elastic.co/community/codeofconduct) specifically the section "Be patient". Also, please refrain from pinging folks directly, this is a forum and anyone that participates might be able to assist you.

If you are in need of a service with an SLA that covers response times for questions then you may want to consider talking to us about a [subscription](https://www.elastic.co/subscriptions).

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

---

<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: [March 22, 2021, 8:44am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/4 "2021-03-22T08:44:40Z")

</div>

Have a look at Index Lifecycle Management feature.  
Otherwise run a script in a crontab.

---

<div class="post-metadata">

### Author: ![Deepz](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Deepz](https://discuss.elastic.co/u/Deepz)
#### Post date: [March 22, 2021, 9:00am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/5 "2021-03-22T09:00:04Z")

</div>

Am new to this forum.  
Im sorry for adding the tag in the first post itself.

Am also new to this elastic search.

And below is my requirement.

1. Would like to list the indices that are older than 3 months (from the name of the indexes)
2. Then delete them

Kindly assist

---

<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: [March 22, 2021, 9:39am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/6 "2021-03-22T09:39:17Z")

</div>

Do you want to do that manually or use the built-in feature? If the later, start from [ILM: Manage the index lifecycle | Elasticsearch Reference [7.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.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: [April 19, 2021, 9:39am UTC](https://discuss.elastic.co/t/automatic-deletion-of-indices-older-than-3-months-in-elastic-search/267957/7 "2021-04-19T09:39:37Z")

</div>

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