There is a newer way of using the command, as it is also the case in a few other docker commands.
Even though both the command can be used to remove a docker image, the command using docker image rm is the most recent way of using it.
There is a newer way of using the command, as it is also the case in a few other docker commands.
Even though both the command can be used to remove a docker image, the command using docker image rm is the most recent way of using it.
Problem
Trying to remove some unused docker images that you no longer use with docker rmi image_id you get the following error message:
Error response from daemon: conflict: unable to delete 75d009de0479 (must be forced) - image is referenced in one or more repositories
Solution
Use the following to delete multiple images (ie ubuntu):
docker images ubuntu | tail -n +2 | awk '{ print $1 ":" $2 }' | xargs sudo docker rmi
Mentioned here