# Proper method for deleting an index

**URL:** <https://discuss.elastic.co/t/proper-method-for-deleting-an-index/13698>\
**Category:** Elasticsearch\
**Created:** [September 20, 2013, 1:21am UTC](https://discuss.elastic.co/t/proper-method-for-deleting-an-index/13698 "2013-09-20T01:21:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom\_rkba](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tom\_rkba](https://discuss.elastic.co/u/tom_rkba)\
**Post date:** [September 20, 2013, 1:21am UTC](https://discuss.elastic.co/t/proper-method-for-deleting-an-index/13698/1 "2013-09-20T01:21:28Z")

</div>

I am deleting old indices using a cronjob:

1 0 \* \* \* find /data/elasticsearch/db/vault\_elasticsearch/nodes/0/indices  
-type d -name 'logstash\*' -mtime +15 -exec basename {} ; | xargs -I INDEX  
curl -XDELETE '[http://localhost:9200/INDEX/](http://localhost:9200/INDEX/)'

This is causing problems in elasticsearch. It's having trouble determining  
whether or not the index is valid. Eventually, the ES process crashes.  
There could be other factors causing this, but for the purposes of this  
post, I only need to verify that I am deleting the index properly.

Thanks!

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [September 20, 2013, 8:15am UTC](https://discuss.elastic.co/t/proper-method-for-deleting-an-index/13698/2 "2013-09-20T08:15:39Z")

</div>

Deleting an index via the delete index api, is the right way to delete an  
index. What kind error en problems are you encountering?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:15am UTC](https://discuss.elastic.co/t/proper-method-for-deleting-an-index/13698/3 "2017-07-06T02:15:26Z")

</div>

Closed on July 6, 2017, 2:15am UTC


