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
# List all stopped containers | |
docker ps --filter "status=exited" | |
# Remove all stopped containers | |
docker rm $(docker ps --filter "status=exited" -aq --no-trunc) | |
# Remove all unused images (http://stackoverflow.com/a/32723127) | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) |