Skip to main content
Delete a volume. This operation is permanent and cannot be undone.
Deleting a volume permanently removes all data stored in it. This action cannot be undone.

Path parameters

volumeId
string
required
The unique ID of the volume to delete

Response

Returns a 204 No Content status on successful deletion.

Error responses

404
Volume not found with the specified ID
409
Volume is currently mounted to one or more sandboxes and cannot be deleted
{
  "statusCode": 409,
  "message": "Volume is currently in use by sandboxes",
  "error": "Conflict"
}

Example request

curl -X DELETE https://api.daytona.io/volumes/vol_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"

Before deleting

Make sure to unmount the volume from all sandboxes before deletion:
  1. List all sandboxes using the volume
  2. Stop or delete those sandboxes
  3. Then delete the volume

Alternative: Get volume ID by name

If you only have the volume name, first get the volume details to find its ID:
# Get volume by name
curl https://api.daytona.io/volumes/by-name/my-data-volume \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response includes ID: "vol_abc123xyz"

# Delete by ID
curl -X DELETE https://api.daytona.io/volumes/vol_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"

Build docs developers (and LLMs) love