# Elasticsearch ILM failed delete closed indices

**URL:** <https://discuss.elastic.co/t/elasticsearch-ilm-failed-delete-closed-indices/354163>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [February 27, 2024, 2:00am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-failed-delete-closed-indices/354163 "2024-02-27T02:00:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcello\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcello_a/32/78018_2.png) [@Marcello\_A](https://discuss.elastic.co/u/Marcello_A)\
**Post date:** [February 27, 2024, 2:00am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-failed-delete-closed-indices/354163/1 "2024-02-27T02:00:59Z")

</div>

HI all,  
we closed some indices on our Elasticsearch 8.12 cluster but the ILM delete action failed the operations with this exception:

024-02-27T02:50:26,198][ERROR][o.e.x.i.IndexLifecycleRunner] [elk01] policy [fns\_delete\_template] for index [fns-prod-2023-11-19] failed on step [{"phase":"delete","action":"delete","name":"wait-for-shard-history-leases"}]. Moving to ERROR step

Can the ILM deletes the closed indices?

Thanks,  
Marcello

---

<div class="post-metadata">

**Author:** ![rtwolfe94022](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rtwolfe94022/32/132253_2.png) [@rtwolfe94022](https://discuss.elastic.co/u/rtwolfe94022)\
**Post date:** [March 1, 2024, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-failed-delete-closed-indices/354163/2 "2024-03-01T06:08:35Z")

</div>

Yes, ILM can delete closed indices, but the error you're seeing indicates a problem with waiting for shard history leases to expire before deletion. To resolve this, check your cluster health, ensure no settings are blocking deletion, review your ILM policy, and consider manually moving the ILM step forward if it's stuck in an error state.

---

<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:** [March 29, 2024, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-failed-delete-closed-indices/354163/3 "2024-03-29T06:08:48Z")

</div>

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