Created
October 30, 2016 16:09
-
-
Save patrickhulce/dc0b6a3ffb19938e1bd5f0375be7611c to your computer and use it in GitHub Desktop.
Docker Cleanup
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
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') # Remove all untagged images | |
docker rm $(docker ps -a | grep -E '^[a-f0-9]+\s+[a-f0-9]+\s' | awk '{print $1}') # Remove all containers running untagged images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment