# Curator cannot delete older indices

**URL:** <https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496>\
**Category:** Elasticsearch\
**Created:** [October 28, 2019, 2:48pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496 "2019-10-28T14:48:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Kaspar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_kaspar/32/44443_2.png) [@Jan\_Kaspar](https://discuss.elastic.co/u/Jan_Kaspar)\
**Post date:** [October 28, 2019, 2:48pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/1 "2019-10-28T14:48:50Z")

</div>

Hi all,

i would like to delete indices older X days. I found a lot of posts here but no one helped me.

**My action file:**

actions:  
1:  
action: delete\_indices  
description: \>-  
Delete indices older than 60 days (based on index name), for winlogbeat-  
prefixed indices. Ignore the error if the filter does not result in an  
actionable list of indices (ignore\_empty\_list) and exit cleanly.  
options:  
ignore\_empty\_list: True  
#timeout\_override:  
#continue\_if\_exception: False  
disable\_action: False  
filters:  
- filtertype: pattern  
kind: prefix  
value: metricbeat-  
#exclude:  
- filtertype: age  
source: name  
direction: older  
timestring: '%Y.%m.%d'  
unit: days  
unit\_count: 2  
#exclude:

Problem is that it do not delete anything. I tryed to find something in debug. But dont know how to solve.

2019-10-28 15:41:41,459 DEBUG curator.indexlist \_\_not\_actionable:39 Index metricbeat-7.2.0-2019.10.26 is not actionable, removing from list.  
2019-10-28 15:41:41,460 DEBUG curator.indexlist \_\_excludify:58 Removed from actionable list: metricbeat-7.2.0-2019.10.26 has index.lifecycle.name metricbeat-7.2.0

How to manage it? I have it in my testing environment and really need to delete indices.

Thanks

Jan

---

<div class="post-metadata">

**Author:** ![B.M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/b.m/32/56771_2.png) [@B.M](https://discuss.elastic.co/u/B.M)\
**Post date:** [October 28, 2019, 3:14pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/2 "2019-10-28T15:14:58Z")

</div>

Hi @Jan_Kaspar,

Could you uncomment timeout\_override, continue\_if\_exception, the first exclude and change the value to metricbeat-7.2.0-\* ?

---

<div class="post-metadata">

**Author:** ![Jan\_Kaspar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_kaspar/32/44443_2.png) [@Jan\_Kaspar](https://discuss.elastic.co/u/Jan_Kaspar)\
**Post date:** [October 28, 2019, 3:19pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/3 "2019-10-28T15:19:49Z")

</div>

Hi B.M

I tryed that but without any success.

Jan

---

<div class="post-metadata">

**Author:** ![B.M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/b.m/32/56771_2.png) [@B.M](https://discuss.elastic.co/u/B.M)\
**Post date:** [October 28, 2019, 3:39pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/4 "2019-10-28T15:39:01Z")

</div>

Could you share your config file

---

<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:** [October 28, 2019, 3:53pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/5 "2019-10-28T15:53:05Z")

</div>

This is expected behavior for this situation.

> [@Jan\_Kaspar](#):
>
> ```auto
> 2019-10-28 15:41:41,460 DEBUG curator.indexlist __excludify:58 Removed from actionable list: metricbeat-7.2.0-2019.10.26 has index.lifecycle.name metricbeat-7.2.0
> 
> ```

Particularly: `has index.lifecycle.name metricbeat-7.2.0`

This means the index is associated with an ILM policy. ILM is Elasticsearch's relatively new [Index Lifecycle Management](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/index-lifecycle-management.html) functionality. You ought to investigate using ILM to manage your indices, if you can.

If for some reason ILM does not meet your needs and/or you'd prefer to [use Curator in conjunction with ILM](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/ilm-or-curator.html), in order to prevent Curator from acting on any ILM associated index, it filters them by default. You can set the [`allow_ilm_indices`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/ilm-and-curator.html) option to `true`.

---

<div class="post-metadata">

**Author:** ![Jan\_Kaspar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_kaspar/32/44443_2.png) [@Jan\_Kaspar](https://discuss.elastic.co/u/Jan_Kaspar)\
**Post date:** [October 28, 2019, 5:14pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/6 "2019-10-28T17:14:02Z")

</div>

Hi,

allow\_ilm\_indices: true solved my problem. Now indices are removed as I expected.  
I have to delete indices because of storage space. I didnt know that ILM can delete indices.

Thanks,

Jan

---

<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:** [November 25, 2019, 5:14pm UTC](https://discuss.elastic.co/t/curator-cannot-delete-older-indices/205496/7 "2019-11-25T17:14:04Z")

</div>

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