Last Updated: September 27, 2016
·
654
· fr0gs

Remove dangling (unreferenced) images in Docker

When you do

docker images

Without the -a option, and sometimes you find some images with the name <none>:<none> , this means that you have intermediate images in docker that are not referenced by any container, hence eating up disk space. To remove them simply

docker rmi $(docker images -f "dangling=true" -q)

Or in fish shell:

docker rmi (docker images -f "dangling=true" -q)