Last Updated: February 25, 2016
·
782
· chrismckinnel

Remove unnecessary Docker images to save disk space

Does this look familiar?

REPO    TAG     IMAGE ID      CREATED        SIZE                          
<none>  <none>  1fa19d1d07e0  6 minutes ago  839.3 MB                         
<none>  <none>  aac7f7ee862b  10 minutes ago 839.3 MB                         
<none>  <none>  be4dbd3ca09e  12 minutes ago 735.5 MB                         
<none>  <none>  d3b3a29d7705  15 minutes ago 922.8 MB                         

When a docker build fails, we see left over containers and images that clutter our workspace and take up our hard disk.

Send them to /dev/null where they belong with this command:

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