# Elasticsearch ILM Deleting an index is just a logical drop, but the index can still be used. Will it eventually be physically deleted

**URL:** <https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 16, 2021, 3:26am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071 "2021-06-16T03:26:29Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 3:26am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/1 "2021-06-16T03:26:29Z")

</div>

View index lifecycle management in Kibana The current phase is Delete and the current action is Complete

thanks

---

<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 16, 2021, 3:29am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/2 "2021-06-16T03:29:55Z")

</div>

It's not clear what you mean here sorry, can you please elaborate?

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 3:40am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/3 "2021-06-16T03:40:19Z")

</div>

LIM is used to manage the index life cycle, while indexes in the drop phase can still be queried.

The index status is as follows

 ![1](https://us1.discourse-cdn.com/elastic/original/3X/3/7/3772872455a4d201457be13af0cc0c88c44b065d.png)

---

<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 16, 2021, 3:49am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/4 "2021-06-16T03:49:05Z")

</div>

What does your policy look like?  
What version are you running?

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/5 "2021-06-16T05:39:14Z")

</div>

elasticsearch 7.10.0 kibana 7.10.0  
LIM only keeps indexes for 1 minute after configuring them in Kibana

The LIM configuration is as follows  
PUT \_ilm/policy/access\_test  
{  
"policy": {  
"phases": {  
"hot": {  
"min\_age": "0ms",  
"actions": {  
"set\_priority": {  
"priority": 100  
}  
}  
},  
"delete": {  
"min\_age": "1m",  
"actions": {}  
}  
}  
}  
}

The index template is as follows  
PUT \_template/access\_test  
{  
"order": 5,  
"version": 60001,  
"index\_patterns": [  
"access-test-\*"  
],  
"settings": {  
"index": {  
"number\_of\_shards": "3",  
"number\_of\_replicas": "1",  
"refresh\_interval": "30s",  
"max\_result\_window": "300000"  
}  
},  
"mappings": {  
"dynamic": "false",  
"properties": {  
"name": {  
"type": "keyword"  
},  
"age": {  
"type": "long"  
}  
}  
},  
"aliases": {}  
}

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 5:42am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/6 "2021-06-16T05:42:22Z")

</div>

Please give your comment,thanks.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 16, 2021, 5:52am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/7 "2021-06-16T05:52:54Z")

</div>

Your delete stage does not seem to have a [delete action](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/ilm-delete.html) which could be why the index is not deleted.

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 6:04am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/8 "2021-06-16T06:04:22Z")

</div>

Thank you very much.I configured and copied the request API through the Kibana graphical interface, and I can see from the Kibana Index Lifecycle Management that the index drop operation has been completed.  
How should I adjust it, please

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 16, 2021, 8:19am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/9 "2021-06-16T08:19:42Z")

</div>

- Thank you. I found the reason

PUT \_ilm/policy/access\_policy  
{  
"policy": {  
"phases": {  
"hot": {  
"min\_age": "0ms",  
"actions": {}  
},  
"delete": {  
"min\_age": "2m",  
"actions": {  
"delete": {  
"delete\_searchable\_snapshot": true  
}  
}  
}  
}  
}  
}

---

<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 17, 2021, 12:52am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/10 "2021-06-17T00:52:37Z")

</div>

There was a bug in 7.11 or 7.12 I think that cause this, upgrading will fix it.

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 17, 2021, 1:54am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/11 "2021-06-17T01:54:20Z")

</div>

I think there is a missing line of code in the official documentation example. When I added it, the index was deleted normally

- Here is a screenshot of the official manual  
 ![2](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59af501c97552919b1cc5dff7f59fdb5257a07a9.png)

---

<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 17, 2021, 1:56am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/12 "2021-06-17T01:56:11Z")

</div>

That screenshot shows the `delete` action under the phase, so it is correct.  
I would suggest upgrading.

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 17, 2021, 2:06am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/13 "2021-06-17T02:06:27Z")

</div>

My version of Elasticsearch is 7.10.0  
Do you mean that the presence or absence of this parameter ("delete\_searchable\_snapshot": true) does not affect index deletion

---

<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 17, 2021, 2:12am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/14 "2021-06-17T02:12:34Z")

</div>

No it does not.

You had this in your policy above;

> [@liuliugang](#):
>
> "delete": {  
> "min\_age": "1m",  
> "actions": {}

And per [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/ilm-delete.html) it should have been;

```auto
"delete": {
    "min_age": "1m",
    "actions": {
        "delete" : { }
    }

```

You were missing the second `delete` decleration.

As I mentioned, there was a bug in earlier versions of Kibana that meant while an ILM policy was created, it didn't include that `delete` in the action. Hence why upgrading will fix it.

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 17, 2021, 3:08am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/15 "2021-06-17T03:08:31Z")

</div>

This is probably a bug in the current version of Kibana (7.10.0)

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

---

<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 17, 2021, 3:12am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/17 "2021-06-17T03:12:31Z")

</div>

Yep, that's what I was saying.

---

<div class="post-metadata">

**Author:** ![liuliugang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liuliugang/32/89053_2.png) [@liuliugang](https://discuss.elastic.co/u/liuliugang)\
**Post date:** [June 17, 2021, 3:16am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/18 "2021-06-17T03:16:23Z")

</div>

Ok, thank you

---

<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 15, 2021, 3:16am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-deleting-an-index-is-just-a-logical-drop-but-the-index-can-still-be-used-will-it-eventually-be-physically-deleted/276071/19 "2021-07-15T03:16:48Z")

</div>

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