Not able to delete indices which are in closed state using ILM

I am not able to delete indices which are in closed state using ILM. Is there any other way to do it?

Don’t close the indices :slight_smile:

(seriously, closing indices is not recommended outside of a few very specific situations like a snapshot restore, just don’t do it)

1 Like

I am working for a legacy system. And they have been keeping indices in closed state for past few months and if disk space fills up, they have been manually deleting indices. Is there anyway to automate it?

You could write an external script but no there’s nothing in Elasticsearch to help here.

Ok. Thanks for your immediate responses David.

Could you please clarify the impact on the cluster if we keep these indices open instead of closing them?

I would expect no significant impact, tho we don’t really use closed indices for anything any more so I don’t have much recent experience with them.

1 Like

Can I flip the question, do you know the reason to (actively) close the indices? I note you said it was a “legacy system”. Since you mentioned it’s a legacy system, I’m curious whether there was a plan or piece of documentation suggesting they’d be reopened later?

It is very common for people to simply have misconceptions or come from old assumptions, or for some rationale that made some sense in 2015 but make less sense in 2025.

A closed index is like an old car, with its wheels taken off, occupying space in your garage. I can imagine a scenario where some IT “manager” thinks “we need to make the garage look full, or we might lose the space to another department”.