Docker Core

A removal request hit a volume that running or stopped containers still mount.

volume-in-use
LowContainer Platform

Reviewed for reference consistency: August 11, 2026

A removal request hit a volume that running or stopped containers still mount.

What volume-in-use Means

The volume-in-use error on the Docker Core indicates a removal request hit a volume that running or stopped containers still mount.. This typically occurs due to containers, including exited ones, still declare the volume.

Named volumes persist independently of containers. The volume removal command refuses targets referenced by any container the daemon knows about, listing the referencing container IDs after the volume-is-in-use clause, because deleting a mounted volume would tear data out from live workloads.

How to fix volume-in-use

General informational guidance, not professional advice. Commands can affect your system or data — back up first and proceed at your own risk. FixerCode is an independent reference, not affiliated with any vendor mentioned.

  1. List volumes with no container references

    The dangling filter on the volume listing shows which named volumes currently lack container references.

    docker volume ls --filter dangling=true
  2. Show which containers mount the volume

    Filtering the container list by volume prints every container declaring the mount, matching the refusal's reference list.

    docker ps -a --filter volume=<volume-name>

Technical Background

Volumes exist precisely to outlive containers, so the guard is by design: the daemon refuses to delete referenced storage the same way it refuses duplicate names.

The referencing list in the message is the complete decision input. Once those containers are gone, the identical removal succeeds; nothing about the volume itself was wrong.

Common Causes

  • Containers, including exited ones, still declare the volume
  • A container from another compose project shares the volume
  • The removal script assumes volume and container lifecycles are synchronized

Typical Scenarios

  • Tidying volumes after a compose down where containers were recreated instead of removed
  • A cleanup script iterating volumes while a forgotten stopped container still references one
  • Recreating a database volume while the old database container still exists

What to Know

The refusal names the exact containers holding references, which turns the decision into container cleanup rather than storage debugging; the volume's data remains intact throughout.

Frequently Asked Questions

Common questions about Docker volume-in-use error

Yes. The refusal changes nothing; the volume and all its contents remain exactly as they were before the attempt.

Project teardown removes project containers, but volumes are kept unless removal is explicitly requested, so later manual removals still see references from anything recreated meanwhile.

Related Error Codes

Related Errors From Other Categories

Similar error codes documented across different platforms and systems