Last active
September 15, 2020 21:53
-
-
Save knappmk/38c8e91278b422bfde45da1ca712cb43 to your computer and use it in GitHub Desktop.
Removing docker images on one way or another
This file contains hidden or 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
# Dangling images | |
docker rmi $(docker images -f dangling=true -q) | |
# Specific repository | |
docker images --filter=reference='REPO/*' | grep "ago" | awk '{print $3}' | xargs docker rmi | |
# Specific time ago | |
docker images | grep "7 days ago" | awk '{print $3}' | xargs docker image rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment