Docker Error response from daemon: conflict: unable to remove repository reference

When tried to remove an image(hello-world) from docker, we have received below error.

docker image rm hello-world

Error response from daemon: conflict: unable to remove repository reference "hello-world" (must force) - container 2399c8b64bc8 is using its referenced image bf756fb1ae65

Docker Error response from daemon conflict unable to remove repository reference

Reason:

Make sure that a container does not exist that is using the image. The container can be stopped and thus won’t show when when run docker ps. You can do docker container ls -a to view all running and stopped container.

docker container ls -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2399c8b64bc8 hello-world "/hello" 13 hours ago Exited (0) 13 hours ago eager_mirzakhani

Solution:
Remove the stopped container and then remove the image as shown below.

docker container rm 2399c8b64bc8 docker image rm hello-world

Leave a Reply

Your email address will not be published. Required fields are marked *