Created
June 8, 2016 08:34
-
-
Save bjoern-r/b1c2f2260b9d6d75dc2d7512eb6027d2 to your computer and use it in GitHub Desktop.
cleanup local 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/bash | |
echo "About to remove the following images:" | |
docker images | awk '/^<none>/ {print}' | |
echo "press <ctrl+c> to abort! <enter> to continue" | |
read foo | |
docker images | awk '/^<none>/ {print $3}' | xargs --no-run-if-empty docker rmi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example output