image is being used by stopped container
You can also use --force , -f
Force removal of the image
If you use the -f flag and specify the image’s short or long ID, then this command untags and removes all images that match the specified ID.
docker rmi -f <image_id>
Note: this command removes images being used by containers.
You need to delete the stopped container with docker rm
, and then you can delete the image it uses with docker rmi
.