# Unable to delete index, unable to mark it as read-only false

**URL:** <https://discuss.elastic.co/t/unable-to-delete-index-unable-to-mark-it-as-read-only-false/373857>\
**Category:** Elasticsearch\
**Created:** [January 29, 2025, 7:16pm UTC](https://discuss.elastic.co/t/unable-to-delete-index-unable-to-mark-it-as-read-only-false/373857 "2025-01-29T19:16:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Fernando\_Palm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_fernando_palm/32/77804_2.png) [@Carlos\_Fernando\_Palm](https://discuss.elastic.co/u/Carlos_Fernando_Palm)\
**Post date:** [January 29, 2025, 7:16pm UTC](https://discuss.elastic.co/t/unable-to-delete-index-unable-to-mark-it-as-read-only-false/373857/1 "2025-01-29T19:16:09Z")

</div>

I tried following the solution here

> [@Unable to delete index](https://discuss.elastic.co/t/unable-to-delete-index/128596/4):
>
> I can't remember which version they fixed this in, but I recall there being a change that allowed you to unset the read-only flag. Older versions (and again, I'm not sure where the cutoff is) did not allow you to unset read-only once set, resulting in an error message like the one you're showing. Have you tried an outright: PUT /indexname/\_settings { "index.blocks.read\_only": false } ...to set the index back to full read/write capacity?

But in my case running  
PUT my\_index/\_settings  
{  
"settings": {  
"index.blocks.read-only": false  
}  
}

yields  
FORBIDDEN/5/index read-only (api)

So I am in a catch 22 situation where my index needs to be set to NOT read only but I can write to the settings because it is read only. My version is 8.12

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 29, 2025, 10:12pm UTC](https://discuss.elastic.co/t/unable-to-delete-index-unable-to-mark-it-as-read-only-false/373857/2 "2025-01-29T22:12:31Z")

</div>

Hi @Carlos_Fernando_Palm

Bad syntax

Incorrect  
`"index.blocks.read-only": false`

Correct  
`"index.blocks.read_only": false`  
`..................^`
