# Deleting index with % in its name

**URL:** <https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811>\
**Category:** Elasticsearch\
**Created:** [November 24, 2012, 2:04pm UTC](https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811 "2012-11-24T14:04:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Dooley](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@James\_Dooley](https://discuss.elastic.co/u/James_Dooley)\
**Post date:** [November 24, 2012, 2:04pm UTC](https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811/1 "2012-11-24T14:04:58Z")

</div>

I am using logstash to store logs in ElasticSearch, and I noticed last  
night that it created an index with a variable in its name.

%{account}-2012.11.23

I fixed the issue on the server, but I am not able to delete the index  
using Head or the API. Head does not respond and the API says the index is  
missing:

{"error":"IndexMissingException[[�count-2012.11.23] missing]","status":404}

What is going to be the best way to remove this index?

I did attempt to escape the %{} symbols but it did not seem to help at all.

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 25, 2012, 12:09am UTC](https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811/2 "2012-11-25T00:09:36Z")

</div>

Did you try to urlencode these symbols? If not try running this command on  
any elasticsearch node:

curl -XDELETE '[http://localhost:9200/%25{account}-2012.11.23](http://localhost:9200/%25%7Baccount%7D-2012.11.23)'

On Saturday, November 24, 2012 9:04:58 AM UTC-5, James Dooley wrote:

> I am using logstash to store logs in Elasticsearch, and I noticed last  
> night that it created an index with a variable in its name.
> 
> %{account}-2012.11.23
> 
> I fixed the issue on the server, but I am not able to delete the index  
> using Head or the API. Head does not respond and the API says the index is  
> missing:
> 
> {"error":"IndexMissingException[[�count-2012.11.23] missing]","status":404}
> 
> What is going to be the best way to remove this index?
> 
> I did attempt to escape the %{} symbols but it did not seem to help at all.

--

---

<div class="post-metadata">

**Author:** ![James\_Dooley](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@James\_Dooley](https://discuss.elastic.co/u/James_Dooley)\
**Post date:** [November 27, 2012, 1:34pm UTC](https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811/3 "2012-11-27T13:34:33Z")

</div>

Looks like that did the trick, I thought I had tried that at one point,  
probably typod something.

Thanks for the fix.

On Saturday, November 24, 2012 7:09:36 PM UTC-5, Igor Motov wrote:

> Did you try to urlencode these symbols? If not try running this command on  
> any elasticsearch node:
> 
> curl -XDELETE '[http://localhost:9200/%25{account}-2012.11.23](http://localhost:9200/%25%7Baccount%7D-2012.11.23)'
> 
> On Saturday, November 24, 2012 9:04:58 AM UTC-5, James Dooley wrote:
> 
> > I am using logstash to store logs in Elasticsearch, and I noticed last  
> > night that it created an index with a variable in its name.
> > 
> > %{account}-2012.11.23
> > 
> > I fixed the issue on the server, but I am not able to delete the index  
> > using Head or the API. Head does not respond and the API says the index is  
> > missing:
> > 
> > {"error":"IndexMissingException[[�count-2012.11.23]  
> > missing]","status":404}
> > 
> > What is going to be the best way to remove this index?
> > 
> > I did attempt to escape the %{} symbols but it did not seem to help at  
> > all.

--

---

<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 6, 2017, 3:02am UTC](https://discuss.elastic.co/t/deleting-index-with-in-its-name/9811/4 "2017-07-06T03:02:44Z")

</div>


