---
title: "Delete a drive"
method: DELETE
path: "/v2/sandboxes/drives/{name}"
tags: ["sandboxes"]
---

# Delete a drive

`DELETE /v2/sandboxes/drives/{name}`

Deletes a drive by project and name. Attached drives cannot be deleted. Stop or replace the session currently using the drive before retrying deletion. Drives are in private beta. Register your interest to get access: https://vercel.com/changelog/drives-for-vercel-sandbox-in-private-beta

## Path parameters

- `name` string, required — Name for the drive. Must be unique per project and URL-safe (alphanumeric, hyphens, underscores).

## Query parameters

- `projectId` string — The project ID or name associated with the drive. Required unless using a Vercel OIDC token scoped to a project.
- `teamId` string
- `slug` string

## Response `200`

- object
  - `drive` Drive, required — This object contains information related to a Vercel Sandbox Drive.
    - `name` string, required — The unique drive name within the project.
    - `projectId` string, required — The project that owns the drive.
    - `maxSizeBytes` number, required — The maximum drive size in bytes.
    - `currentSessionId` string — Current session ID the drive is attached to, if any.
    - `currentSandboxName` string — Current sandbox name the drive is attached to, if any.
    - `createdAt` number, required — The time when the drive was created, in milliseconds since the epoch.
    - `updatedAt` number, required — The last time the drive was updated, in milliseconds since the epoch.

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `404`
- `409`
- `410`
- `429`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/61d1ba3f6dac/schema)
