Created
February 2, 2017 13:20
-
-
Save vitor-caetano/8120902dcb46a397281d546a9800ca46 to your computer and use it in GitHub Desktop.
Remove old docker images
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
| docker images --no-trunc --format '{{.ID}} {{.CreatedSince}}' | grep ' days' | awk '{ print $1 }' | xargs docker rmi || true | |
| docker images --no-trunc --format '{{.ID}} {{.CreatedSince}}' | grep ' weeks' | awk '{ print $1 }' | xargs docker rmi || true | |
| docker images --no-trunc --format '{{.ID}} {{.CreatedSince}}' | grep ' months' | awk '{ print $1 }' | xargs docker rmi || true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment