# Indices not being deleted with the ILM policy set

**URL:** <https://discuss.elastic.co/t/indices-not-being-deleted-with-the-ilm-policy-set/350658>\
**Category:** Kibana\
**Tags:** ilm-index-lifecycle-management\
**Created:** [January 9, 2024, 1:47pm UTC](https://discuss.elastic.co/t/indices-not-being-deleted-with-the-ilm-policy-set/350658 "2024-01-09T13:47:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Pattar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_pattar/32/124209_2.png) [@Ravi\_Pattar](https://discuss.elastic.co/u/Ravi_Pattar)\
**Post date:** [January 9, 2024, 1:47pm UTC](https://discuss.elastic.co/t/indices-not-being-deleted-with-the-ilm-policy-set/350658/1 "2024-01-09T13:47:50Z")

</div>

Hello,

I have set an ILM policy for filebeat index as below. The purpose of implementing the ILM policy was because of the huge disk space utilization because of the indices data.

```auto
    Hot phase (Required)
    Rollover: enabled
    Maximum primary shard size: 10G
    Maximum index size: 10G
    Maximum age: 7 days

    Delete phase
    Move data into phase when:10 days old

```

Note: The ILM policy was implemented on 29th of Dec 2023. I was expecting the policy will run smoothly as the 7 days time period has already elapsed. However, I don't see its working as expected and deletion is not happening.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f77fec0f74bbb05b16f2bcea21199bf89ab9dcd.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/9/297535448f079f06c1e21abe86c93f77f7a5f00d.png)

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

GET /\<filebeat-7.17.15\>/\_ilm/explain?human

```auto
{
  "indices" : {
    "filebeat-7.17.15-2024.01.05-000003" : {
      "index" : "filebeat-7.17.15-2024.01.05-000003",
      "managed" : true,
      "policy" : "filebeat",
      "lifecycle_date" : "2024-01-05T11:23:13.476Z",
      "lifecycle_date_millis" : 1704453793476,
      "age" : "4.09d",
      "phase" : "hot",
      "phase_time" : "2024-01-05T11:23:13.731Z",
      "phase_time_millis" : 1704453793731,
      "action" : "rollover",
      "action_time" : "2024-01-05T11:23:13.931Z",
      "action_time_millis" : 1704453793931,
      "step" : "check-rollover-ready",
      "step_time" : "2024-01-05T11:23:13.931Z",
      "step_time_millis" : 1704453793931,
      "phase_execution" : {
        "policy" : "filebeat",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "10gb",
              "max_primary_shard_size" : "10gb",
              "max_age" : "7d"
            }
          }
        },
        "version" : 6,
        "modified_date" : "2024-01-09T07:11:44.455Z",
        "modified_date_in_millis" : 1704784304455
      }
    },
    "filebeat-7.17.15-2023.12.29-000002" : {
      "index" : "filebeat-7.17.15-2023.12.29-000002",
      "managed" : true,
      "policy" : "filebeat",
      "lifecycle_date" : "2024-01-05T11:23:13.531Z",
      "lifecycle_date_millis" : 1704453793531,
      "age" : "4.09d",
      "phase" : "hot",
      "phase_time" : "2023-12-29T11:13:13.703Z",
      "phase_time_millis" : 1703848393703,
      "action" : "complete",
      "action_time" : "2024-01-05T11:23:13.931Z",
      "action_time_millis" : 1704453793931,
      "step" : "complete",
      "step_time" : "2024-01-05T11:23:13.931Z",
      "step_time_millis" : 1704453793931,
      "phase_execution" : {
        "policy" : "filebeat",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "10gb",
              "max_primary_shard_size" : "10gb",
              "max_age" : "7d"
            }
          }
        },
        "version" : 6,
        "modified_date" : "2024-01-09T07:11:44.455Z",
        "modified_date_in_millis" : 1704784304455
      }
    }
  }
}

```

Running version 7.17.15

Am I missing anything here? Please suggest.

Thanks,

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 10, 2024, 9:54am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-with-the-ilm-policy-set/350658/2 "2024-01-10T09:54:24Z")

</div>

Hi,

In your case, the `min_age` for the delete phase is 10 days. This means that **10 days after the rollover** , the index should be deleted.

Regards

---

<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:** [February 7, 2024, 9:54am UTC](https://discuss.elastic.co/t/indices-not-being-deleted-with-the-ilm-policy-set/350658/3 "2024-02-07T09:54:45Z")

</div>

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