Last active
January 2, 2016 07:48
-
-
Save jamesbrink/8271949 to your computer and use it in GitHub Desktop.
clear out all docker crap
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
docker ps -a|grep -v "CONTAINER ID"|awk '{print $1}'|xargs docker rm && docker images|grep -v REPOSITORY|awk '{print $3'}|xargs docker rmi |
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
docker ps -a |grep Exited|grep -v "CONTAINER ID"|awk '{print $1}'|xargs docker rm && docker images|grep -v REPOSITORY|awk '{print $3'}|xargs docker rmi | |
# Kill only exited containers and images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment