# Lifecycle delete phase question

**URL:** <https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876>\
**Category:** Elasticsearch\
**Created:** [September 7, 2022, 10:59am UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876 "2022-09-07T10:59:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![artax\_sb](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@artax\_sb](https://discuss.elastic.co/u/artax_sb)\
**Post date:** [September 7, 2022, 10:59am UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876/1 "2022-09-07T10:59:35Z")

</div>

Hi all,

I want to make a lifecycle policy to my index

I want the conditions are delete after 15days or 25gb

but in delete phase it only allows me delete after n days not by n gb too

Is there some way to make that? (without rollover )

thanks in advance

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 7, 2022, 12:17pm UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876/2 "2022-09-07T12:17:55Z")

</div>

Reading the ILM documentation I see two relevant things:

From the [Phase Transitions](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-index-lifecycle.html#ilm-phase-transitions) section (bolds are mine)

> ILM moves indices through the lifecycle **according to their age**. To control the timing of these transitions, you set a _minimum age_ for each phase. For an index to move to the next phase, all actions in the current phase must be complete and the index must be **older** than the minimum age of the next phase.

Then in the [Rollover documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-rollover.html#index-rollover) it explicitly states that they are needed to delete old data:

> Using rolling indices enables you to:
> - Optimize the active index for high ingest rates on high-performance _hot_ nodes.
> - Optimize for search performance on _warm_ nodes.
> - Shift older, less frequently accessed data to less expensive _cold_ nodes,
> - **Delete data** according to your retention policies by removing entire indices.

So my understanding is that you need to define a rollover policy to rotate your indices and then move those old indices into a delete phase according to their age.

---

<div class="post-metadata">

**Author:** ![artax\_sb](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@artax\_sb](https://discuss.elastic.co/u/artax_sb)\
**Post date:** [September 7, 2022, 12:52pm UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876/3 "2022-09-07T12:52:58Z")

</div>

Thank you so much!

Im having some problems with rollover policy...

I dont sure if I can ask here o create a new post

Thanks

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 7, 2022, 1:22pm UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876/4 "2022-09-07T13:22:11Z")

</div>

Please create a new post 🙏

---

<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 5, 2022, 1:23pm UTC](https://discuss.elastic.co/t/lifecycle-delete-phase-question/313876/5 "2022-10-05T13:23:00Z")

</div>

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