Skip to content

Why data in a volume survives docker rm

Select an icon to see what it is.

Step 5 of 6

Deleting a volume takes a separate command

docker rm -v removes only anonymous volumes of that container, and named volumes stay. docker volume rm appdata sends DELETE /volumes/appdata, which deletes the directory and its files. Docker refuses with 409 if a container still uses the volume.

$ docker volume rm appdata

DELETE /v1.45/volumes/appdata

204 No Content when removed
409 Conflict if a container still uses it