# Selective deletion of indices

**URL:** <https://discuss.elastic.co/t/selective-deletion-of-indices/314370>\
**Category:** Elasticsearch\
**Created:** [September 14, 2022, 6:12am UTC](https://discuss.elastic.co/t/selective-deletion-of-indices/314370 "2022-09-14T06:12:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie2022](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie2022/32/110840_2.png) [@newbie2022](https://discuss.elastic.co/u/newbie2022)\
**Post date:** [September 14, 2022, 6:12am UTC](https://discuss.elastic.co/t/selective-deletion-of-indices/314370/1 "2022-09-14T06:12:57Z")

</div>

I have a ruby web app with a search function that is enabled by Elasticsearch.

There are 2 types of content

- Content A which should be searchable indefinitely
- Content B which is time-sensitive and no longer relevant after 90 days

How can I auto delete indices of content A beyond 90 days which always keeping content A indices ?

---

<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:** [September 14, 2022, 6:13am UTC](https://discuss.elastic.co/t/selective-deletion-of-indices/314370/2 "2022-09-14T06:13:42Z")

</div>

Welcome to our community! 😃

Take a look at [ILM](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html) to manage this for you.

---

<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:** [October 12, 2022, 6:14am UTC](https://discuss.elastic.co/t/selective-deletion-of-indices/314370/3 "2022-10-12T06:14:24Z")

</div>

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