# Delete Elasticsearch Indices older than 2 months

**URL:** <https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560>\
**Category:** Elasticsearch\
**Created:** [March 19, 2018, 1:06pm UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560 "2018-03-19T13:06:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishu.kolki](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@vishu.kolki](https://discuss.elastic.co/u/vishu.kolki)\
**Post date:** [March 19, 2018, 1:06pm UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/1 "2018-03-19T13:06:47Z")

</div>

Hi Team,

I want to delete the elastic search indices older than 2 months. Can you please help me how can i do that?  
My Elasticsearch version is 2.4.1.

Thanks

---

<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 19, 2018, 3:18pm UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/2 "2018-03-19T15:18:52Z")

</div>

I'd look at curator: [https://www.elastic.co/guide/en/elasticsearch/client/curator/5.4/index.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.4/index.html)

Unless it's a one single operation you want to do and not a daily one.

---

<div class="post-metadata">

**Author:** ![richl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richl/32/28946_2.png) [@richl](https://discuss.elastic.co/u/richl)\
**Post date:** [March 19, 2018, 3:28pm UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/3 "2018-03-19T15:28:56Z")

</div>

I was just thinking about what's the best way of doing this too what @dadoonet said appears to be the best way.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 19, 2018, 5:45pm UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/4 "2018-03-19T17:45:43Z")

</div>

For Elasticsearch 2.4.1, you will want to use Curator v4.3.1. v5 only supports Elasticsearch 5.x and 6.x

---

<div class="post-metadata">

**Author:** ![vishu.kolki](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@vishu.kolki](https://discuss.elastic.co/u/vishu.kolki)\
**Post date:** [March 20, 2018, 4:37am UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/5 "2018-03-20T04:37:54Z")

</div>

Thanks a lot for your help.

---

<div class="post-metadata">

**Author:** ![vishu.kolki](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@vishu.kolki](https://discuss.elastic.co/u/vishu.kolki)\
**Post date:** [March 20, 2018, 4:38am UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/6 "2018-03-20T04:38:21Z")

</div>

Thanks a lot David, I will go with curator.

---

<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 17, 2018, 4:38am UTC](https://discuss.elastic.co/t/delete-elasticsearch-indices-older-than-2-months/124560/7 "2018-04-17T04:38:50Z")

</div>

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