Skip to content

Instantly share code, notes, and snippets.

@breun
Last active October 21, 2022 11:21
Show Gist options
  • Save breun/ff9f73cfa888d0e1d3bcbdeb3a5eab5f to your computer and use it in GitHub Desktop.
Save breun/ff9f73cfa888d0e1d3bcbdeb3a5eab5f to your computer and use it in GitHub Desktop.
Remove all untagged Docker images
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