ProjectStack
docker

Error response from daemon: device or resource busy

Docker is trying to remove or modify a resource (container, volume, network, or image) that something else is still using. This usually means a container using a volume or network is still running, or a running container is built from the image you're trying to remove.

Common causes

  • Trying to remove a volume that a running container is still using
  • Trying to remove a network that a running container is attached to
  • Removing an image that a running or stopped container was created from
  • Trying to remove a container whose filesystem is still mounted

How to fix it

  1. Stop all containers using the resource first: docker ps to find them, then docker stop CONTAINER_ID
  2. Force remove a container: docker rm -f CONTAINER_ID
  3. Remove all containers using a volume, then remove the volume: docker rm $(docker ps -aq) && docker volume rm VOLUME_NAME
  4. Use docker system prune to safely clean up all unused resources at once

Example

$ docker volume rm myapp_data Error response from daemon: remove myapp_data: volume is in use - [abc123, def456]

Trying to remove a volume that two containers are still using

Browse more errors

The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.