Tag Archives: Docker delete container image error

How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)

I don’t know if you have encountered an error when
docker deletes the container image

docker RMI container image ID

Details of error reporting:

Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced) – image is referenced in multiple repositories

Solution:

First docker PS - a
see several containers with the same image ID. what the hell, There must be a mistake during the construction, and then stop the container using the container image (if it has stopped, please go to the next step)
docker stop the ID of the container using the container image and RM drop
docker RM the ID of the container using the container image and
docker RMI the container image ID

Discovery or error


Well, the ultimate solution (that’s the point of this article)

docker rmi -f This container image ID

It is the above command with the – f parameter that forcibly deletes all container images with the container image ID