← Back to Blog
Utility

How to Remove a docker image from Mac docker

You'll be able to remove your docker image from your system after reading this article.

See all images:

docker images

Remove a specific image by passing its Name (Repository) or Image ID:

docker rmi <IMAGE_ID_OR_NAME>

Force the removal if you get an error stating the image is being used by a stopped container (and you are sure you want to delete it anyway):

docker rmi -f <IMAGE_ID_OR_NAME>

Remove all unused images (any image not currently associated with a container):

docker image prune -a

Remove all images at once:

docker rmi $(docker images -a -q)