# ILM not deleting indicies

**URL:** <https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [March 1, 2021, 1:16pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799 "2021-03-01T13:16:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesp220291](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jamesp220291](https://discuss.elastic.co/u/jamesp220291)\
**Post date:** [March 1, 2021, 1:16pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/1 "2021-03-01T13:16:03Z")

</div>

Hi

i have some ILM with a delete phase after 7/30 days. However the indexs are not being deleted.

```
### Index lifecycle management

**Lifecycle policy**

[apm-rollover-30-days]

**Current action**

complete

**Failed step**

-

**Current phase**

delete

**Current action time**

2021-01-07 11:13:20

**Phase definition**

Show definition

```

its just stuck in the delete phase, and it should of been deleted a long time ago, why is es not deleting these?

should of been deleted on the 07/02/2021 and its still there nearly a month later.

---

<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:** [March 2, 2021, 2:17am UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/2 "2021-03-02T02:17:34Z")

</div>

Please share your policy and an [explain](https://www.elastic.co/guide/en/elasticsearch/reference/7.11/ilm-explain-lifecycle.html) against the index.

---

<div class="post-metadata">

**Author:** ![jamesp220291](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jamesp220291](https://discuss.elastic.co/u/jamesp220291)\
**Post date:** [March 2, 2021, 8:34am UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/3 "2021-03-02T08:34:25Z")

</div>

index -

```auto
    {
      "indices" : {
        "apm-7.10.0-error-000001" : {
          "index" : "apm-7.10.0-error-000001",
          "managed" : true,
          "policy" : "apm-rollover-30-days",
          "lifecycle_date_millis" : 1610017400389,
          "age" : "53.89d",
          "phase" : "delete",
          "phase_time_millis" : 1610707404916,
          "action" : "complete",
          "action_time_millis" : 1610018000194,
          "step" : "complete",
          "step_time_millis" : 1610707404916,
          "phase_execution" : {
            "policy" : "apm-rollover-30-days",
            "phase_definition" : {
              "min_age" : "7d",
              "actions" : { }
            },
            "version" : 8,
            "modified_date_in_millis" : 1610707402427
          }
        }
      }
    }

```

ILM -

```
{
  "apm-rollover-30-days" : {
    "version" : 8,
    "modified_date" : "2021-01-15T10:43:22.427Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "28gb",
              "max_age" : "1d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "7d",
          "actions" : { }
        },
        "warm" : {
          "min_age" : "0ms",
          "actions" : {
            "allocate" : {
              "include" : { },
              "exclude" : { },
              "require" : {
                "data" : "warm"
              }
            },
            "forcemerge" : {
              "max_num_segments" : 1
            },
            "readonly" : { },
            "set_priority" : {
              "priority" : 50
            }
          }
        }
      }
    }
  }
}
```

---

<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:** [March 2, 2021, 6:15pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/4 "2021-03-02T18:15:23Z")

</div>

> [@jamesp220291](#):
>
> ```auto
> "delete" : {
> "min_age" : "7d",
> "actions" : { }
> },
> 
> ```

You need a delete in the actions section too 🙂

---

<div class="post-metadata">

**Author:** ![jamesp220291](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jamesp220291](https://discuss.elastic.co/u/jamesp220291)\
**Post date:** [March 3, 2021, 9:52am UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/5 "2021-03-03T09:52:04Z")

</div>

i actually did this ILM via the kibana UI.

so, is this just something that doesnt happen in the UI?

sounds like a bug?

yep it is...

> <https://github.com/elastic/kibana/issues/88589>
>
> Kibana version:
> 7.10.1
> Elasticsearch version:
> 7.10.1
> Server OS version:
> debian
> Browser version:
> Firefox
> Browser OS version:
> Windows
> Original install method (e.g. download page, yum, from source, etc.):
> download page
> Describe the bug:
> It appears...

thanks 🙂

how would i now edit these policies to include the action?

---

<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:** [March 3, 2021, 10:26pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/6 "2021-03-03T22:26:19Z")

</div>

You can copy the policy above, add the delete and then post it to the API in (the Kibana) Console.  
Or just upgrade 🙂

---

<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 31, 2021, 10:26pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-indicies/265799/7 "2021-03-31T22:26:41Z")

</div>

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