---
layout: docs
page_title: 'Commands: volume deregister'
description: |
  Deregister volumes with CSI plugins.
---

# Command: volume deregister

The `volume deregister` command deregisters external storage volumes with
Nomad's [Container Storage Interface (CSI)][csi] support. The volume will be
removed from Nomad's state store but not deleted from the external storage
provider. Note that deregistering a volume prevents Nomad from deleting it via
[`volume delete`] at a later time.

## Usage

```plaintext
nomad volume deregister [options] [volume]
```

The `volume deregister` command requires a single argument, specifying
the ID of volume to be deregistered. Deregistration will fail if the
volume is still in use by an allocation or in the process of being
unpublished.

When ACLs are enabled, this command requires a token with the
`csi-write-volume` capability for the volume's namespace.

## General Options

@include 'general_options.mdx'

## Deregister Options

- `-force`: Force deregistration of the volume and immediately drop claims for
  terminal allocations. Returns an error if the volume has running
  allocations. This does not detach the volume from client nodes.

[csi]: https://github.com/container-storage-interface/spec
[`volume delete`]: /docs/commands/volume/delete
