github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/var/purge.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: "Command: var purge"
     4  description: |-
     5    The "var purge" command permanently removes the specified variable
     6    from Nomad.
     7  ---
     8  
     9  # Command: var purge
    10  
    11  The `var purge` command permanently deletes an existing [variable][] from Nomad's
    12  variable storage.
    13  
    14  ## Usage
    15  
    16  ```plaintext
    17  nomad var purge [options] <path>
    18  ```
    19  
    20  The `var purge` command requires the path to the variable.
    21  
    22  If ACLs are enabled, this command requires a token with the `variables:destroy`
    23  capability for the target variable's namespace and path. See the [ACL policy][]
    24  documentation for details.
    25  
    26  ## General Options
    27  
    28  @include 'general_options.mdx'
    29  
    30  ## Command Options
    31  
    32  - `-check-index` `(int: <unset>)`: If set, the variable is only acted upon if
    33    the server-side version's index matches the provided value. When a variable
    34    specification contains a modify index, that modify index is used as the
    35    check-index for the check-and-set operation and can be overridden using this
    36    flag.
    37  
    38  ## Examples
    39  
    40  Purge the variable at the "secret/creds" path.
    41  
    42  ```shell-session
    43  $ nomad var purge -y secret/creds
    44  Successfully purged variable "secret/creds"!
    45  ```
    46  
    47  [variable]: /docs/concepts/variables
    48  [ACL Policy]: /docs/other-specifications/acl-policy#variables