"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.
Frequently asked questions
docker volume rm: Remove Volumes & In-Use Errors?
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 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.