Files
nomad/website/content/docs/commands/volume/delete.mdx
Aimee Ukasick 95ee9261a5 Docs: fix broken links in 1.10 beta docs (#25469)
* Docs: fix 1.10 broken link in operations/stateful-workloads

* updated the link in other pages
2025-03-20 13:17:09 -05:00

53 lines
1.8 KiB
Plaintext

---
layout: docs
page_title: 'nomad volume delete command reference'
description: |
The `nomad volume delete` command deletes Container Storage Interface (CSI) and dynamic host storage volumes.
---
# `nomad volume delete` command reference
The `volume delete` command deletes storage volumes that are either [Container
Storage Interface (CSI)][csi] volumes or dynamic host volumes.
For CSI volumes, only CSI plugins that implement the
[Controller][csi_plugins_internals] interface support this command. The volume
is [deregistered][] when it is successfully deleted.
For dynamic host volumes, only volumes with plugins are deleted. Volumes without
plugins are deregistered without deleting them.
## Usage
```plaintext
nomad volume delete [options] [volume]
```
The `volume delete` command requires a single argument, specifying the ID of
volume to be deleted. The volume must still be [registered][] with Nomad in
order to be deleted. Deleting fails if the volume is still in use by an
allocation or in the process of being unpublished. If the volume no longer
exists, this command silently returns without an error.
When ACLs are enabled, this command requires a token with the appropriate
capability in the volume's namespace: the `csi-write-volume` capability for CSI
volumes or `host-volume-delete` for dynamic host volumes.
## General options
@include 'general_options.mdx'
## Delete options
- `-secret`: Secrets to pass to the plugin to delete the snapshot. Accepts
multiple flags in the form `-secret key=value`. Only available for CSI
volumes.
- `-type`: Type of volume to delete. Must be one of "csi" or "host". Defaults to
"csi".
[csi]: https://github.com/container-storage-interface/spec
[csi_plugins_internals]: /nomad/docs/concepts/plugins/storage/csi
[deregistered]: /nomad/docs/commands/volume/deregister
[registered]: /nomad/docs/commands/volume/register