Created
May 4, 2016 00:19
-
-
Save atma/3acaf2f5054da52c6aec9cfa7a6a3581 to your computer and use it in GitHub Desktop.
Clean all Docker containers and/or 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
#clean all containers: | |
docker ps -a | sed '1 d' | awk '{print $1}' | xargs -L1 docker rm | |
#clean all images: | |
docker images -a | sed '1 d' | awk '{print $3}' | xargs -L1 docker rmi -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment