Last active
October 21, 2022 11:21
-
-
Save breun/ff9f73cfa888d0e1d3bcbdeb3a5eab5f to your computer and use it in GitHub Desktop.
Remove all untagged 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
DIGESTS=`docker images | awk '$2 == "<none>" { print $3 }'` | |
if [ -n "${DIGESTS}" ]; then | |
docker rmi --force $DIGESTS | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment