Created
October 6, 2016 11:43
-
-
Save haffla/28b5c3f24a225f829aa8006a828338a3 to your computer and use it in GitHub Desktop.
Remove old Docker containers and 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
CONTAINERS: | |
docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm | |
IMAGES: | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment