[[indices-delete-component-template]]
=== Delete component template API
++++
<titleabbrev>Delete component template</titleabbrev>
++++

.New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs].
--

Deletes an existing component template.

////
[source,console]
--------------------------------------------------
PUT _component_template/template_1
{
  "template": {
    "settings": {
      "index.number_of_replicas": 0
    }
  }
}
--------------------------------------------------
// TESTSETUP
////

[source,console]
--------------------------------------------------
DELETE _component_template/template_1
--------------------------------------------------

The provided <component-template> may contain multiple template names separated by a comma.
If multiple template names are specified then there is no wildcard support and the
provided names should match completely with existing component templates.

[[delete-component-template-api-request]]
==== {api-request-title}

`DELETE /_component_template/<component-template>`

[[delete-component-template-api-prereqs]]
==== {api-prereq-title}

* If the {es} {security-features} are enabled, you must have the
`manage_index_templates` or `manage` <<privileges-list-cluster,cluster
privilege>> to use this API.

[[delete-component-template-api-desc]]
==== {api-description-title}

Use the delete component template API to delete one or more component templates
Component templates are building blocks for constructing <<index-templates,index templates>>
that specify index mappings, settings, and aliases.

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

include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=component-template]


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

include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
