1---
2layout: "docs"
3page_title: "kv undelete - Command"
4sidebar_title: "<code>undelete</code>"
5sidebar_current: "docs-commands-kv-undelete"
6description: |-
7  The "kv undelete" command undeletes the data for the provided version and path
8  in the key-value store. This restores the data, allowing it to be returned on
9  get requests.
10---
11
12# kv undelete
13
14~> **NOTE:** This is a [K/V Version 2](/docs/secrets/kv/kv-v2.html) secrets
15engine command, and not available for Version 1.
16
17
18The `kv undelete` command undoes the deletes of the data for the provided version
19and path in the key-value store. This restores the data, allowing it to be
20returned on get requests.
21
22## Examples
23
24Undelete version 3 of the key "creds":
25
26```text
27$ vault kv undelete -versions=3 secret/creds
28Success! Data written to: secret/undelete/creds
29```
30
31## Usage
32
33There are no flags beyond the [standard set of flags](/docs/commands/index.html)
34included on all commands.
35
36### Output Options
37
38- `-format` `(string: "table")` - Print the output in the given format. Valid
39  formats are "table", "json", or "yaml". This can also be specified via the
40  `VAULT_FORMAT` environment variable.
41
42### Command Options
43
44- `-versions` `([]int: <required>)` - Specifies the version number that should
45be made current again.
46