Skip to content
Latchkey

docker volume rm: Remove Volumes & In-Use Errors

Delete a named volume and reclaim its disk.

docker volume rm removes one or more volumes. This page covers the in-use error and how it differs from docker volume prune.

What it does

docker volume rm deletes named volumes and their data. A volume cannot be removed while a container (even a stopped one) references it.

Common usage

Terminal
docker volume rm pgdata
docker volume rm $(docker volume ls -q --filter "dangling=true")

Common errors in CI

"Error response from daemon: remove pgdata: volume is in use - [container-id]" means a container still references it - remove that container first (docker rm -f), then the volume. Removing a volume deletes its data irreversibly; do not run blanket volume removals on shared runners with persistent state you care about.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →