DELETE
/volumes/{name} Instruct the driver to remove the volume.
Connection and access
API connection and authentication guidance
/v1.57
No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.
Parameters
name
path
Required
Volume name or ID
Type:
string
All schema constraints and annotations
{
"type": "string"
}force
query
Force the removal of the volume
Type:
boolean
All schema constraints and annotations
{
"default": false,
"type": "boolean"
}Request and responses
Response
204
The volume was removed
No response content is declared.
Response
404
No such volume or volume driver
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
409
Volume is in use and cannot be removed
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
500
Server error
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Referenced schemas
#/components/schemas/ErrorResponse
Complete operation contract
{
"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"
]
}