# Indices not being deleted in ILM policy

**URL:** <https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 6, 2021, 10:05am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492 "2021-02-06T10:05:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KevSex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevsex/32/29031_2.png) [@KevSex](https://discuss.elastic.co/u/KevSex)\
**Post date:** [February 6, 2021, 10:05am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492/1 "2021-02-06T10:05:47Z")

</div>

For some reason, my indices are not being deleted after the delete phase is triggered.

I have a policy as below:

```auto
{
  "unifi" : {
    "version" : 1,
    "modified_date" : "2021-01-28T14:21:47.860Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "2d",
          "actions" : { }
        },
        "warm" : {
          "min_age" : "1d",
          "actions" : {
            "forcemerge" : {
              "max_num_segments" : 1,
              "index_codec" : "best_compression"
            },
            "set_priority" : {
              "priority" : 50
            },
            "shrink" : {
              "number_of_shards" : 1
            }
          }
        }
      }
    }
  }
}

```

When an index reaches the 2d since index creation, I can see it running through the delete phase and it shows as complete but it doesn't get removed.

When I do an `_ilm/explain` on the index, it shows as follows:

```auto
{
  "indices" : {
    "logstash-unifi-2021.02.03" : {
      "index" : "logstash-unifi-2021.02.03",
      "managed" : true,
      "policy" : "unifi",
      "lifecycle_date" : "2021-02-03T00:00:00.351Z",
      "lifecycle_date_millis" : 1612310400351,
      "age" : "3.41d",
      "phase" : "delete",
      "phase_time" : "2021-02-05T00:00:40.709Z",
      "phase_time_millis" : 1612483240709,
      "action" : "complete",
      "action_time" : "2021-02-04T00:16:19.792Z",
      "action_time_millis" : 1612397779792,
      "step" : "complete",
      "step_time" : "2021-02-05T00:00:40.709Z",
      "step_time_millis" : 1612483240709,
      "phase_execution" : {
        "policy" : "unifi",
        "phase_definition" : {
          "min_age" : "2d",
          "actions" : { }
        },
        "version" : 1,
        "modified_date" : "2021-01-28T14:21:47.860Z",
        "modified_date_in_millis" : 1611843707860
      }
    }
  }
}

```

Running version `7.10.2`

Am I missing something?

Cheers,  
Kev

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [February 8, 2021, 3:53am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492/2 "2021-02-08T03:53:18Z")

</div>

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

according to the [documents](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/ilm-delete.html) you are missing the actions?!

```auto
...
        "delete" : {
          "min_age" : "2d",
          "actions" : { 
              "delete" : { }
            }
        },
...

```

---

<div class="post-metadata">

**Author:** ![KevSex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevsex/32/29031_2.png) [@KevSex](https://discuss.elastic.co/u/KevSex)\
**Post date:** [February 8, 2021, 9:08am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492/3 "2021-02-08T09:08:32Z")

</div>

Don't know why I never seen that.. thanks!

I created it from the Kibana UI which is why I thought it was all good so might have been a bug. I did create it in 7.10.1 and had upgraded so could have been fixed already.

Cheers again

---

<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:** [February 8, 2021, 7:55pm UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492/4 "2021-02-08T19:55:49Z")

</div>

Yeah, it was indeed a Kibana bug 🙂

---

<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 8, 2021, 7:56pm UTC](https://discuss.elastic.co/t/indices-not-being-deleted-in-ilm-policy/263492/5 "2021-03-08T19:56:39Z")

</div>

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