From: James Bunton Date: Tue, 23 Jul 2019 11:41:50 +0000 (+1000) Subject: docker-cleanup: also delete things more than 1 year old X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/c501eaa373c60f514a513671b88681cf07e70712?ds=sidebyside docker-cleanup: also delete things more than 1 year old --- diff --git a/docker-cleanup b/docker-cleanup index 4562828..b7c3c63 100755 --- a/docker-cleanup +++ b/docker-cleanup @@ -7,7 +7,7 @@ docker container prune -f docker volume prune -f docker images --no-trunc --format '{{.ID}} {{.CreatedSince}}' \ - | awk '/ months/ { print $1 }' \ + | awk '/ months/ || / years/ { print $1 }' \ | xargs --no-run-if-empty docker rmi -f docker image prune -f