open-consul/website/content/commands/config/delete.mdx

49 lines
1.4 KiB
Plaintext
Raw Normal View History

---
layout: commands
2020-04-07 18:55:19 +00:00
page_title: 'Commands: Config Delete'
---
# Consul Config Delete
Command: `consul config delete`
Corresponding HTTP API Endpoint: [\[DELETE\] /v1/config/:kind/:name](https://www.consul.io/api-docs/config#delete-configuration)
The `config delete` command deletes the configuration entry specified by the
kind and name. See the [configuration entries docs](/docs/agent/config-entries)
for more details about configuration entries.
## Usage
Usage: `consul config delete [options]`
#### API Options
2020-04-07 18:55:19 +00:00
@include 'http_api_options_client.mdx'
#### Enterprise Options
2020-04-07 18:55:19 +00:00
@include 'http_api_namespace_options.mdx'
@include 'http_api_partition_options.mdx'
#### Config Delete Options
2020-04-07 18:55:19 +00:00
- `-kind` - Specifies the kind of the config entry to read.
- `-name` - Specifies the name of the config entry to delete. The name of the
`proxy-defaults` config entry must be `global`, and the name of the `mesh`
config entry must be `mesh`.
- `-cas` - Perform a Check-And-Set operation. Specifying this value also
requires the -modify-index flag to be set. The default value is false.
- `-modify-index=<int>` - Unsigned integer representing the ModifyIndex of the
config entry. This is used in combination with the -cas flag.
## Examples
$ consul config delete -kind service-defaults -name web
$ consul config delete -kind service-defaults -name web -cas -modify-index 26