<commit_before>[[indices-delete-index]]
=== Delete index API
++++
<titleabbrev>Delete index</titleabbrev>
++++

Deletes an existing index.

[source,console]
--------------------------------------------------
DELETE /twitter
--------------------------------------------------
// TEST[setup:twitter]


[[delete-index-api-request]]
==== {api-request-title}

`DELETE /<index>`


[[delete-index-api-path-params]]
==== {api-path-parms-title}

`<index>`::
+
--
(Request, string) Comma-separated list or wildcard expression of indices to
delete.

In this parameter, wildcard expressions match only open, concrete indices. You
cannot delete an index using an <<indices-aliases,alias>>.

To delete all indices, use `_all` or `*` . To disallow the deletion of indices
with `_all` or wildcard expressions, change the
`action.destructive_requires_name` cluster setting to `true`. You can update
this setting in the `elasticsearch.yml` file or using the
<<cluster-update-settings,cluster update settings>> API.
--


[[delete-index-api-query-params]]
==== {api-query-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]<commit_msg>[DOCS] Prohibit deletion of a data stream's write index (#58341)<commit_after>[[indices-delete-index]]
=== Delete index API
++++
<titleabbrev>Delete index</titleabbrev>
++++

Deletes an existing index.

[source,console]
--------------------------------------------------
DELETE /twitter
--------------------------------------------------
// TEST[setup:twitter]


[[delete-index-api-request]]
==== {api-request-title}

`DELETE /<index>`


[[delete-index-api-path-params]]
==== {api-path-parms-title}

`<index>`::
+
--
(Request, string) Comma-separated list or wildcard expression of indices to
delete.

In this parameter, wildcard expressions match only open, concrete indices. You
cannot delete an index using an <<indices-aliases,alias>>.

To delete all indices, use `_all` or `*` . To disallow the deletion of indices
with `_all` or wildcard expressions, change the
`action.destructive_requires_name` cluster setting to `true`. You can update
this setting in the `elasticsearch.yml` file or using the
<<cluster-update-settings,cluster update settings>> API.

NOTE: You cannot delete the current write index of a data stream. To delete the
index, you must <<rollover-data-stream-ex,roll over>> the data stream so a new
write index is created. You can then use the delete index API to delete the
previous write index.
--


[[delete-index-api-query-params]]
==== {api-query-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
{'fraction_non_alphanumeric': 0.20201701859439017, 'fraction_numerical': 0.001575795776867318, 'mean_word_length': 3.6335766423357665, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5821213', 'n_tokens_mistral': 996, 'n_tokens_neox': 969, 'n_words': 261}