Unable to delete few indicies

how do I get rid of these indices?

# curl --silent --request GET $ELASTICSEARCH_URI/_cat/indices | grep metadata
green open %{[@metadata][beat]}-2018.02.20                         IVbWWsxTRiSDZCNNb8VDAw 5 1          1         0   36.3kb   18.1kb
green open %{[@metadata][beat]}-2018.02.21                         av3uixdMTriA83fx1Tuadg 5 1         70         0    1.4mb  784.1kb
green open %{[@metadata][beat]}-%{[@metadata][version]}-2018.02.21 Cbg3LZ_JRa23rkvZgzvyHg 5 1          7         0  202.7kb  101.3kb
# 

I tried to follow Delete Index | Elasticsearch Reference [6.2] | Elastic, but that did not work for me:

# curl --verbose --request DELETE 0:9200/_cat/%{[@metadata][beat]}-2018.02.20
curl: (3) [globbing] nested brace in column 15
# 

Please advise.

I was able to figure it out)

# curl --verbose --request DELETE $ELASTICSEARCH_URI/%25%7B%5B%40metadata%5D%5Bbeat%5D%7D-2018.02.20?pretty
*   Trying 0.0.0.0...
* TCP_NODELAY set
* Connected to 0 (127.0.0.1) port 9200 (#0)
* Server auth using Basic with user 'elastic'
> DELETE /%25%7B%5B%40metadata%5D%5Bbeat%5D%7D-2018.02.20?pretty HTTP/1.1
> Host: 0:9200
> Authorization: Basic ZWxhc3RpYzoxMjgwZjRhN2IzZTVkMTg1ZTNhMjVmNGExMDE2NDg2ZTY3YTZiNTA0
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 28
< 
{
  "acknowledged" : true
}
* Curl_http_done: called premature == 0
* Connection #0 to host 0 left intact
#

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