Created
December 1, 2014 15:50
-
-
Save Elzair/7d2a54ddba726bd8983b to your computer and use it in GitHub Desktop.
Remove Unused Docker Images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script removes docker images with a repository tag of <none>. | |
for i in $(sudo docker images | awk '{print $1,$3;}' | grep '<none>' | awk '{print $2;}') | |
do | |
sudo docker rmi $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment