# Delete all Indices through curl API

**URL:** <https://discuss.elastic.co/t/delete-all-indices-through-curl-api/15092>\
**Category:** Elasticsearch\
**Created:** [January 3, 2014, 1:16pm UTC](https://discuss.elastic.co/t/delete-all-indices-through-curl-api/15092 "2014-01-03T13:16:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ananth](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ananth](https://discuss.elastic.co/u/ananth)\
**Post date:** [January 3, 2014, 1:16pm UTC](https://discuss.elastic.co/t/delete-all-indices-through-curl-api/15092/1 "2014-01-03T13:16:06Z")

</div>

Hi,

curl -XDELETE '[http://localhost:9200/\_all](http://localhost:9200/_all)' taking too much time to clear  
indices. ES cluster (version Beta1) has 2 dedicated master nodes , 10  
dedicated data-nodes.

Each node has approximately 350 shards . action.disable\_delete\_all\_indices  
is false only on both master & data nodes. I got response  
{"ok":true,"acknowledged" : true} in few minutes.

But shards not deleted any more. In the meantime i notices cluster health  
api shows , 10 shards are relocating (since my setting concurrent rebalance  
: 10).

{  
"cluster\_name": "test",  
"status": "red",  
"timed\_out": false,  
"number\_of\_nodes": 22,  
"number\_of\_data\_nodes": 10,  
"active\_primary\_shards": 858,  
"active\_shards": 1716,  
"relocating\_shards": 10,  
"initializing\_shards": 0,  
"unassigned\_shards": 82  
}

i have executed curl -XDELETE '[http://localhost:9200/\_all](http://localhost:9200/_all)' nearly 5 or 6  
times. Its nearly more than an hour , shards not deleted immediately.

Is rebalancing triggered for each index delete even i said to clear all  
indices ?

--  
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/b0dcae1e-61aa-43ab-825c-077dc0b1f96c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b0dcae1e-61aa-43ab-825c-077dc0b1f96c%40googlegroups.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, 1:58am UTC](https://discuss.elastic.co/t/delete-all-indices-through-curl-api/15092/2 "2017-07-06T01:58:30Z")

</div>


