Error response from daemon: conflict: unable to delete (must be forced) – image is being used by stopped container – Docker error – How to fix?

In this post you will learn how to fix the Docker error – Error response from daemon: conflict: unable to delete (must be forced) – image is being used by stopped container.

This error occurs when you try to delete a docker image.

docker rmi 2938e0bbe9a7


Error response from daemon: conflict: unable to delete  (must be forced) - image 2938e0bbe9a7 being used by stopped container d2b3c3c6e6c1

This is because this image is being used by a container. Hence it is not allowing you to remove the image. To fix this, first remove the container that uses your docker image. Then, remove the image.

//remove container first

docker rm d2b3c3c6e6c1


//then remove the image

docker rmi 2938e0bbe9a7

Hola!