conflict: unable to remove repository reference Docker Origin: Platform & cloud Last updated 12 Oct 2026

conflict: unable to remove repository reference (must force) - container is using its referenced image

You tried to delete an image that a container — even a stopped one — still uses.

Exact message you may see unable to remove repository referencecontainer is using its referenced imageimage is being used by stopped container
Seen on: Docker

Meaning

Stopped containers keep a reference to their image. Remove the containers first (or use docker image prune / docker system prune), or force-remove the image tag.

Common causes

  • Stopped containers created from the image still exist
  • Compose project containers not removed (docker compose down not run)

⚡ Quick fix

  1. Remove the container(s): docker rm <id>
  2. Clean up: docker container prune then docker image prune
  3. Force only if you know the container is disposable: docker rmi -f

Detailed fix by platform

Docker

  1. bash
    docker ps -a --filter ancestor=myimage:1.0
    docker rm $(docker ps -aq --filter ancestor=myimage:1.0)
    docker rmi myimage:1.0

How to diagnose

  1. Users — docker ps -a --filter ancestor=image
  2. Compose — docker compose ls

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

1011 — Cloudflare Error 1011: Access denied (Hotlinking denied) (Cloudflare)1011ENOSPC — no space left on device (Docker / Linux) (Docker)ENOSPCexec format error — exec /usr/local/bin/docker-entrypoint.sh: exec format error (Docker)exec format errorGD missing — Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg() (PHP)GD missingimage has dependent child images — conflict: unable to delete image (cannot be forced) - image has dependent child images (Docker)image has dependent c…invalid reference format — docker: invalid reference format (repository name must be lowercase) (Docker)invalid reference for…manifest unknown — manifest for image:tag not found: manifest unknown (Docker)manifest unknownmax depth exceeded — Error response from daemon: max depth exceeded (too many image layers) (Docker)max depth exceededconflict:…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.