You cannot remove images having multiple repositories without the force modifier, see Docker docs for more info.
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
repository/image-name tag a8e6fa672e89 10 days ago 344MB
repository2/image-name tag a8e6fa672e89 10 days ago 344MB
If you want to do it manually, instead of using the image id to remove the images, you must remove the repository/tag that you don't need using image names:
docker rmi a8e6fa672e89
Error response from daemon: conflict: unable to delete a8e6fa672e89 (must be forced) - image is referenced in multiple repositories
The "repositories" it is talking about is part of the first column of a docker images:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
repository/image-name tag a8e6fa672e89 10 days ago 344MB
repository2/image-name tag a8e6fa672e89 10 days ago 344MB
(I take the samples which Gabriel showed in his answer)
Here we have two repositories: "repository" and "repository2". As you also can see, both images have the same IMAGE ID.
A docker images -q lists all available IMAGE ID's. Thus if you want to remove an IMAGE ID which is referenced by two images you get the error that you have mentioned.
Solution: You can remove the image by its name instead of its ID:
You can clean up all containers. First of all, you need to stop all containers with: docker stop $(docker ps -aq). Finally, remove all containers with: docker rm $(docker ps -aq). You can do it all in one command docker rm $(docker stop $(docker ps -aq)).
Error response from daemon: conflict: unable to delete 3472c3b5350b (must be forced) - image is referenced in multiple repositories
Error response from daemon: conflict: unable to delete 3472c3b5350b (must be forced) - image is referenced in multiple repositories
If this error is coming first untag the image and then it can be deleted.
This can be done by using thee following command.
docker rmi :<image_tag>
The underlying problem is that you are trying to remove the image, but the image is tagged as Tarun Banda wrote. So don't delete the image by its id, but by its tag. That will untag the image, and then delete it.