# ILM isn't deleting searchable snapshots

**URL:** <https://discuss.elastic.co/t/ilm-isnt-deleting-searchable-snapshots/293388>\
**Category:** Kibana\
**Tags:** ilm-index-lifecycle-management, elastic-stack-searchable-snapshots\
**Created:** [January 3, 2022, 10:51pm UTC](https://discuss.elastic.co/t/ilm-isnt-deleting-searchable-snapshots/293388 "2022-01-03T22:51:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [January 3, 2022, 10:51pm UTC](https://discuss.elastic.co/t/ilm-isnt-deleting-searchable-snapshots/293388/1 "2022-01-03T22:51:14Z")

</div>

I'm trying to figure out why my old data that is currently a searchable snapshot isn't being deleted from my ILM policy:

Here's the \_ilm/explain output:

```auto
{
  "indices" : {
    "restored-.ds-dev-metricbeat-datastream-2021.12.16-000001" : {
      "index" : "restored-.ds-dev-metricbeat-datastream-2021.12.16-000001",
      "managed" : true,
      "policy" : "dev_policy-v2",
      "lifecycle_date_millis" : 1639840035356,
      "age" : "16.31d",
      "phase" : "cold",
      "phase_time_millis" : 1640272231108,
      "action" : "allocate",
      "action_time_millis" : 1640272231508,
      "step" : "allocate",
      "step_time_millis" : 1640273236908,
      "repository_name" : "found-snapshots",
      "snapshot_name" : "2021.12.23-.ds-dev-metricbeat-datastream-2021.12.16-000001-dev_policy-v2-pmzzcxf4rfo5ptqkz_fvpw",
      "phase_execution" : {
        "policy" : "dev_policy-v2",
        "phase_definition" : {
          "min_age" : "5d",
          "actions" : {
            "allocate" : {
              "number_of_replicas" : 0,
              "include" : { },
              "exclude" : { },
              "require" : {
                "data" : "warm"
              }
            },
            "readonly" : { },
            "searchable_snapshot" : {
              "snapshot_repository" : "found-snapshots",
              "force_merge_index" : true
            },
            "set_priority" : {
              "priority" : 0
            }
          }
        },
        "version" : 2,
        "modified_date_in_millis" : 1639602175167
      }
    }
  }
}

```

And here's my ilm policy:

```auto
{
  "dev_policy-v2" : {
    "version" : 4,
    "modified_date" : "2022-01-03T22:50:06.174Z",
    "policy" : {
      "phases" : {
        "warm" : {
          "min_age" : "3d",
          "actions" : {
            "readonly" : { },
            "forcemerge" : {
              "max_num_segments" : 1
            },
            "set_priority" : {
              "priority" : 50
            },
            "migrate" : {
              "enabled" : false
            }
          }
        },
        "cold" : {
          "min_age" : "5d",
          "actions" : {
            "readonly" : { },
            "allocate" : {
              "number_of_replicas" : 0,
              "include" : { },
              "exclude" : { },
              "require" : {
                "data" : "warm"
              }
            },
            "searchable_snapshot" : {
              "snapshot_repository" : "found-snapshots",
              "force_merge_index" : true
            },
            "set_priority" : {
              "priority" : 0
            }
          }
        },
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_primary_shard_size" : "500mb",
              "max_age" : "2d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "7d",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        }
      }
    }
}

```

Why is an index that has an age of 16d still around?

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [January 5, 2022, 6:22am UTC](https://discuss.elastic.co/t/ilm-isnt-deleting-searchable-snapshots/293388/2 "2022-01-05T06:22:04Z")

</div>

Bump plz 🙂

---

<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 2, 2022, 6:22am UTC](https://discuss.elastic.co/t/ilm-isnt-deleting-searchable-snapshots/293388/3 "2022-02-02T06:22:35Z")

</div>

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