2019-05-01 11:21:11 -07:00
|
|
|
---
|
2020-09-01 10:14:13 -05:00
|
|
|
layout: commands
|
2020-04-07 14:55:19 -04:00
|
|
|
page_title: 'Commands: Config Delete'
|
2019-05-01 11:21:11 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul Config Delete
|
|
|
|
|
|
|
|
Command: `consul config delete`
|
|
|
|
|
2019-05-08 16:19:37 -04:00
|
|
|
The `config delete` command deletes the configuration entry specified by the
|
2020-10-14 10:23:05 -05:00
|
|
|
kind and name. See the [configuration entries docs](/docs/agent/config-entries)
|
2019-05-08 16:19:37 -04:00
|
|
|
for more details about configuration entries.
|
2019-05-01 11:21:11 -07:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul config delete [options]`
|
|
|
|
|
|
|
|
#### API Options
|
|
|
|
|
2020-04-07 14:55:19 -04:00
|
|
|
@include 'http_api_options_client.mdx'
|
2019-05-01 11:21:11 -07:00
|
|
|
|
2020-02-07 12:01:04 -08:00
|
|
|
#### Enterprise Options
|
|
|
|
|
2020-04-07 14:55:19 -04:00
|
|
|
@include 'http_api_namespace_options.mdx'
|
2020-02-07 12:01:04 -08:00
|
|
|
|
2021-12-14 17:55:21 -08:00
|
|
|
@include 'http_api_partition_options.mdx'
|
|
|
|
|
2019-05-01 11:21:11 -07:00
|
|
|
#### Config Delete Options
|
|
|
|
|
2020-04-07 14:55:19 -04:00
|
|
|
- `-kind` - Specifies the kind of the config entry to read.
|
2019-05-01 11:21:11 -07:00
|
|
|
|
2021-05-06 14:04:26 -04:00
|
|
|
- `-name` - Specifies the name of the config entry to delete. The name of the
|
2021-05-04 17:32:07 -04:00
|
|
|
`proxy-defaults` config entry must be `global`, and the name of the `mesh`
|
|
|
|
config entry must be `mesh`.
|
2019-05-01 11:21:11 -07:00
|
|
|
|
2021-11-01 16:42:01 +00:00
|
|
|
- `-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.
|
|
|
|
|
2019-05-01 11:21:11 -07:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
$ consul config delete -kind service-defaults -name web
|
2021-11-01 16:42:01 +00:00
|
|
|
|
|
|
|
$ consul config delete -kind service-defaults -name web -cas -modify-index 26
|