# ILM not deleting data

**URL:** <https://discuss.elastic.co/t/ilm-not-deleting-data/335204>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 5, 2023, 10:40am UTC](https://discuss.elastic.co/t/ilm-not-deleting-data/335204 "2023-06-05T10:40:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitor\_Nilson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vitor_nilson/32/119824_2.png) [@Vitor\_Nilson](https://discuss.elastic.co/u/Vitor_Nilson)\
**Post date:** [June 5, 2023, 10:40am UTC](https://discuss.elastic.co/t/ilm-not-deleting-data/335204/1 "2023-06-05T10:40:27Z")

</div>

Hello,

I'm trying to set a ILM to an index, but it's not deleting old data.

This is my ILM:

```auto
PUT _ilm/policy/kong_lifecycle
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "set_priority": {
            "priority": 100
          }
        }
      },
      "delete": {
        
        "min_age": "1m",
        "actions": {
          "delete": {
          
          }
        }
      }
    }
  }
}

```

This is the explain of my index `kong`:

```auto
{
  "indices": {
    "kong": {
      "index": "kong",
      "managed": false
    }
  }
}

```

And this is my index template:

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

As you can see, I'm trying to delete data older than 1 minute, but this is not happening.

New data that comes to the index keep living in there and data from, for example, january still in there.

What am I missing?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 5, 2023, 12:48pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-data/335204/2 "2023-06-05T12:48:05Z")

</div>

> [@Vitor\_Nilson](#):
>
> As you can see, I'm trying to delete data older than 1 minute, but this is not happening.

Can you share the result of running `GET _cat/indices/kong*?v` in Kibana Dev Tools?

> [@Vitor\_Nilson](#):
>
> New data that comes to the index keep living in there and data from, for example, january still in there.

Are the data from January in indices that where created in january as well?

Can you share the results of running `GET index-from-january/_settings` in Dev Tools?

---

<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:** [June 5, 2023, 10:11pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-data/335204/3 "2023-06-05T22:11:26Z")

</div>

> [@Vitor\_Nilson](#):
>
> As you can see, I'm trying to delete data older than 1 minute, but this is not happening.

1 minute as a timeframe won't work as ILM runs every 10 minutes. Also it doesn't delete data in the index, it deletes indices themselves.

Does that help clarify anything?

---

<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:** [July 3, 2023, 10:11pm UTC](https://discuss.elastic.co/t/ilm-not-deleting-data/335204/4 "2023-07-03T22:11:47Z")

</div>

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