# Delete index directory

**URL:** <https://discuss.elastic.co/t/delete-index-directory/16762>\
**Category:** Elasticsearch\
**Created:** [April 2, 2014, 8:21am UTC](https://discuss.elastic.co/t/delete-index-directory/16762 "2014-04-02T08:21:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11145](https://avatars.discourse-cdn.com/v4/letter/1/9e8a1a/32.png) [@11145](https://discuss.elastic.co/u/11145)\
**Post date:** [April 2, 2014, 8:21am UTC](https://discuss.elastic.co/t/delete-index-directory/16762/1 "2014-04-02T08:21:15Z")

</div>

I've tried deleting an index by calling '$ curl -XDELETE '[http://localhost:9200/indexName](http://localhost:9200/indexName)',  
but in actual file system 'indexName' directory still persists in the path  
'repository/elasticsearch/data/228.5.8.6/nodes/0/indices/'.  
The delete API only deletes '\_state' directory under 'indexName' directory.  
Because of this, I can't recreate an index with the same name.  
Does anyone have any workaround for this?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2f426122-558f-4b03-92ad-0c3e957a6773%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2f426122-558f-4b03-92ad-0c3e957a6773%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 4, 2014, 12:57pm UTC](https://discuss.elastic.co/t/delete-index-directory/16762/2 "2014-04-04T12:57:36Z")

</div>

Are there any errors in the log when you delete the index? It sounds like  
you may need to give correct permissions to the account running your ES  
instance to be able to delete from the data folders.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6a0e9a35-33bf-455d-99cb-da97ecee903f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a0e9a35-33bf-455d-99cb-da97ecee903f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:38am UTC](https://discuss.elastic.co/t/delete-index-directory/16762/3 "2017-07-06T01:38:12Z")

</div>


