# Configurations setting does not restric delete of all indices

**URL:** <https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708>\
**Category:** Elasticsearch\
**Created:** [March 7, 2016, 9:33pm UTC](https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708 "2016-03-07T21:33:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajay\_bh111](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ajay\_bh111](https://discuss.elastic.co/u/ajay_bh111)\
**Post date:** [March 7, 2016, 9:33pm UTC](https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708/1 "2016-03-07T21:33:25Z")

</div>

ES version: 2.2.0  
Java 1.8.0\_74-b02  
OS: 3.16.0-60-lowlatency (Ubuntu 14.04)

Expected behavior, it should not delete all indices when the configuration setting action.disable\_delete\_all\_indices is set to true.

Configuration setting in file elasticsearch.yml  
action.disable\_delete\_all\_indices: true.

root@es-thr-chef-m01:/# curl -XPUT '[http://localhost:9200/customer?pretty](http://localhost:9200/customer?pretty)'  
{  
"acknowledged" : true  
}  
root@es-thr-chef-m01:/# curl -XDELETE '[http://localhost:9200/\*?pretty](http://localhost:9200/*?pretty)'  
{  
"acknowledged" : true  
}  
root@es-thr-chef-m01:/# curl '[http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v)'  
health status index pri rep docs.count docs.deleted store.size pri.store.size

(All indexes deleted)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 7, 2016, 9:41pm UTC](https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708/2 "2016-03-07T21:41:15Z")

</div>

Did you restart Elasticsearch after applying the setting?

---

<div class="post-metadata">

**Author:** ![ajay\_bh111](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ajay\_bh111](https://discuss.elastic.co/u/ajay_bh111)\
**Post date:** [March 7, 2016, 9:51pm UTC](https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708/3 "2016-03-07T21:51:12Z")

</div>

yes.

Repeated again:  
root@es-thr-chef-m01:/# service elasticsearch stop

- Stopping Elasticsearch Server [OK]  
root@es-thr-chef-m01:/# service elasticsearch start
- Starting Elasticsearch Server [OK]  
root@es-thr-chef-m01:/# curl 'localhost:9200/\_cat/health?v'  
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending\_tasks max\_task\_wait\_time active\_shards\_percent  
1457386968 21:42:48 es-test-chef green 11 5 0 0 0 0 0 0 - 100.0%  
root@es-thr-chef-m01:/# curl -XPUT '[http://localhost:9200/customer?pretty](http://localhost:9200/customer?pretty)'  
{  
"acknowledged" : true  
}  
root@es-thr-chef-m01:/# curl '[http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v)'  
health status index pri rep docs.count docs.deleted store.size pri.store.size  
green open customer 5 1 0 0 1.2kb 650b  
root@es-thr-chef-m01:/# curl -XDELETE '[http://localhost:9200/\*?pretty](http://localhost:9200/*?pretty)'  
{  
"acknowledged" : true  
}

From command: curl -XGET '[http://localhost:9200/\_nodes/es-thr-chef-m01/settings?pretty](http://localhost:9200/_nodes/es-thr-chef-m01/settings?pretty)'  
....snip...  
"name" : "es-thr-chef-m01",  
"action" : {  
"disable\_delete\_all\_indices" : "true"  
},  
..snip...

---

<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 5, 2017, 11:10pm UTC](https://discuss.elastic.co/t/configurations-setting-does-not-restric-delete-of-all-indices/43708/4 "2017-07-05T23:10:33Z")

</div>


