2022-09-12 20:44:31 +00:00
|
|
|
---
|
|
|
|
layout: docs
|
|
|
|
page_title: "Command: var purge"
|
|
|
|
description: |-
|
|
|
|
The "var purge" command permanently removes the specified variable
|
|
|
|
from Nomad.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: var purge
|
|
|
|
|
2022-09-13 14:21:29 +00:00
|
|
|
The `var purge` command permanently deletes an existing [variable][] from Nomad's
|
2022-09-12 20:44:31 +00:00
|
|
|
variable storage.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```plaintext
|
|
|
|
nomad var purge [options] <path>
|
|
|
|
```
|
|
|
|
|
|
|
|
The `var purge` command requires the path to the variable.
|
|
|
|
|
|
|
|
If ACLs are enabled, this command requires a token with the `variables:destroy`
|
2022-09-13 14:21:29 +00:00
|
|
|
capability for the target variable's namespace and path. See the [ACL policy][]
|
|
|
|
documentation for details.
|
2022-09-12 20:44:31 +00:00
|
|
|
|
|
|
|
## General Options
|
|
|
|
|
|
|
|
@include 'general_options.mdx'
|
|
|
|
|
|
|
|
## Command Options
|
|
|
|
|
|
|
|
- `-check-index` `(int: <unset>)`: If set, the variable is only acted upon if
|
|
|
|
the server-side version's index matches the provided value. When a variable
|
|
|
|
specification contains a modify index, that modify index is used as the
|
|
|
|
check-index for the check-and-set operation and can be overridden using this
|
|
|
|
flag.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Purge the variable at the "secret/creds" path.
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ nomad var purge -y secret/creds
|
|
|
|
Successfully purged variable "secret/creds"!
|
|
|
|
```
|
2022-09-13 14:21:29 +00:00
|
|
|
|
|
|
|
[variable]: /docs/concepts/variables
|
|
|
|
[ACL Policy]: /docs/other-specifications/acl-policy#variables
|