2017-09-08 02:13:20 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: delete - Command
|
2017-09-08 02:13:20 +00:00
|
|
|
description: |-
|
|
|
|
The "delete" command deletes secrets and configuration from Vault at the given
|
|
|
|
path. The behavior of "delete" is delegated to the backend corresponding to
|
|
|
|
the given path.
|
|
|
|
---
|
|
|
|
|
|
|
|
# delete
|
|
|
|
|
|
|
|
The `delete` command deletes secrets and configuration from Vault at the given
|
2022-04-21 16:17:24 +00:00
|
|
|
path (wrapper command for HTTP DELETE). The behavior of "delete" is delegated to
|
|
|
|
the backend corresponding to the given path.
|
2017-09-08 02:13:20 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2018-08-22 18:26:21 +00:00
|
|
|
Remove data in the static secrets engine:
|
2017-09-08 02:13:20 +00:00
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:13:20 +00:00
|
|
|
$ vault delete secret/my-secret
|
|
|
|
```
|
|
|
|
|
|
|
|
Uninstall an encryption key in the transit backend:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:13:20 +00:00
|
|
|
$ vault delete transit/keys/my-key
|
|
|
|
```
|
|
|
|
|
2022-02-04 18:13:24 +00:00
|
|
|
Note: changing the `deletion_allowed` parameter to `true` is necessary for the
|
2023-01-26 00:12:15 +00:00
|
|
|
key to be successfully deleted, you can read more on key parameters [here](/vault/api-docs/secret/transit#update-key-configuration)
|
2022-02-04 18:13:24 +00:00
|
|
|
|
2017-09-08 02:13:20 +00:00
|
|
|
Delete an IAM role:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:13:20 +00:00
|
|
|
$ vault delete aws/roles/ops
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-01-26 00:12:15 +00:00
|
|
|
There are no flags beyond the [standard set of flags](/vault/docs/commands)
|
2017-09-08 02:13:20 +00:00
|
|
|
included on all commands.
|