Delete closed idex


I use opensearch-2.10 and I want to find closed index after that I want to delete them by curl command.

How can I do it?

You can use cat index API with specifying expand_wildcards parameter to get closed indices:

GET _cat/indices?expand_wildcards=closed

Thanks gaobinlong but I can’t get with this command;

curl -u admin:password -X GET

Is there any mistake in my command?

Not: I use openserch in graylog compose

You mean the API returns empty response with 200 status code? If so seems that there’s not any closed index in your cluster.

I try to open with browser and saw the return page is “Page not found” And there is a note that say “The party gorilla was just here, but had another party to rock.Oh, party gorilla! How we miss you! Will we ever see you again?”

There ara closed indicies that I can see in the indicies page;

By the way if I use 9200 port with my graylog admin:password value it returns me with “Authentication finally failed” message

You can see the screenshot below