# Remove a volume


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`DELETE /volumes/{name}`

Instruct the driver to remove the volume.

## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request DELETE \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  'http://localhost/v1.57/volumes/<NAME>'
```



## Parameters

### name

Location: path. Required: yes.

Volume name or ID

```json
{
  "description": "Volume name or ID",
  "in": "path",
  "name": "name",
  "pointer": "/paths/~1volumes~1{name}/delete/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### force

Location: query. Required: no.

Force the removal of the volume

```json
{
  "description": "Force the removal of the volume",
  "in": "query",
  "name": "force",
  "pointer": "/paths/~1volumes~1{name}/delete/parameters/1",
  "schema": {
    "default": false,
    "type": "boolean"
  }
}
```

## Request and responses

### Response 204 

The volume was removed

No response content is declared.











### Response 404 application/json

No such volume or volume driver


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


### Response 409 application/json

Volume is in use and cannot be removed


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


### Response 500 application/json

Server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "description": "Instruct the driver to remove the volume.",
  "operationId": "VolumeDelete",
  "parameters": [
    {
      "description": "Volume name or ID",
      "in": "path",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Force the removal of the volume",
      "in": "query",
      "name": "force",
      "schema": {
        "default": false,
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "204": {
      "description": "The volume was removed"
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "No such volume or volume driver"
    },
    "409": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Volume is in use and cannot be removed"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Server error"
    }
  },
  "summary": "Remove a volume",
  "tags": [
    "Volume"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)




