Last active
February 14, 2016 04:38
-
-
Save mixxen/cf61217d36e7d887f96c to your computer and use it in GitHub Desktop.
Docker cleanup commands
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
| #remove all stopped containers | |
| docker rm $(docker ps -a -q) | |
| #remove all untagged images | |
| docker rmi $(docker images | grep "^<none>" | awk "{print $3}") | |
| #remove all images | |
| docker rmi -f $(docker images -q) | |
| #remove dockers by name | |
| docker rmi $(docker images | grep KEYWORD | awk '{print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment