# Delete a volume

Delete a volume you no longer need, after detaching it and deleting its snapshots, and confirm that it reports DELETED and frees its quota.

Delete a volume to remove its data and stop paying for it. Deleting frees the volume’s share of your storage quota once the deletion completes. You can’t undo a delete.

## Before you begin [#before-you-begin]

<BeforeYouBegin>

- The volume’s URN.
- Permission `pvs.volume.delete` on the volume. See [Built-in roles](/docs/iam/roles).
- The volume isn’t attached to an instance. A volume that reports `INUSE` must be detached first. See [Attach and detach volumes](/docs/compute/instance-storage/attach-detach).
- The volume has no snapshots left. Every snapshot that doesn’t report `DELETED` blocks the delete, including one in `ERROR`, because a failed snapshot may still hold a copy of the data.

</BeforeYouBegin>

## Clear what blocks the delete [#clear-what-blocks-the-delete]

1. Check the volume’s status. If it’s `INUSE`, find the instance and detach the volume. See [Find the instance a volume is attached to](/docs/storage/volumes/find-instance).

   ```sh
   origin storage get-volume --volume-urn <volume-urn>
   ```

1. Find the volume’s snapshots. Every snapshot reports the volume it was taken from as `volumeUrn`. List your project’s snapshots with the API and look for that URN:

   ```graphql
   query {
     pvs {
       snapshots(input: { projectUrn: "<project-urn>" }) {
         urn
         volumeUrn
         status
         protectionStatus
       }
     }
   }
   ```

1. Delete each of those snapshots, unprotecting it first if needed, and wait until each reports `DELETED`. See [Delete a snapshot](/docs/storage/snapshots/delete).

## Delete the volume [#delete-the-volume]

1. Delete the volume.

   ```sh
   origin storage delete-volume --volume-urn <volume-urn>
   ```

   With the API, use the `deleteVolume` mutation:

   ```graphql
   mutation {
     pvs {
       deleteVolume(input: { volumeUrn: "<volume-urn>" }) {
         accepted
         message
       }
     }
   }
   ```

1. Check the volume until it reports `DELETED`.

   ```sh
   origin storage get-volume --volume-urn <volume-urn>
   ```

   A deleted volume drops out of `origin storage list-volumes` at once. You can still look it up by URN, with no time limit.

<Callout type="warning" title="Check that the delete took effect">

A delete of a volume that still has snapshots should be refused with an error. In our testing on 12 October 2026, it was accepted and silently did nothing. Don’t rely on the error: check that the volume’s `status` reads `DELETED`. If it stays `AVAILABLE`, look for snapshots of it:

```sh
origin storage list-snapshots --project-urn <project-urn> \
  | jq --arg v "<volume-urn>" '.. | objects | select(.volumeUrn? == $v)'
```

Delete every snapshot it prints, unprotecting it first if needed, then delete the volume again.

</Callout>

## What the platform refuses [#what-the-platform-refuses]

These requests are refused immediately with an error, and nothing about the volume changes:

| Request | What happens |
| --- | --- |
| The volume is attached | The error names the attachment that holds the volume. Detach the volume, or terminate the instance, and try again. |
| The volume has snapshots | The error names each snapshot that blocks the delete. Delete those snapshots first, then try again. |
| The volume is already being deleted | A volume in `DELETING` or `DELETED` can’t be deleted again. |

You can delete a volume in `ERROR`. That’s how you clean up a volume whose creation or deletion failed.

## If this fails [#if-this-fails]

If the deletion is accepted but fails, the volume stays in your list as `ERROR` with a `statusReason`, and its disk may still exist. It still counts against your quota. Delete it again. See [Troubleshoot storage](/docs/storage/troubleshooting).

## Related [#related]

- [Volume states](/docs/storage/volumes/volume-states)
- [`delete-volume` command](/docs/storage/reference/cli#delete-volume)

