Created
May 29, 2014 17:46
-
-
Save stilliard/85bc193428a2f01e06f1 to your computer and use it in GitHub Desktop.
cleanup-docker
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
# Delete old docker containers | |
sudo docker rm `sudo docker ps --no-trunc -a -q` | |
# Delete old docker images | |
sudo docker rmi $(sudo docker images -a | grep -P '([A-z0-9_\-<>\/]+)\s+([A-z0-9_\-<>\/]+)\s+([A-z0-9_\-<>\/]+).*$' | awk '{print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment