Created
August 25, 2016 13:09
-
-
Save tobiashm/58121bc8245a4774675cea30d41fb84f to your computer and use it in GitHub Desktop.
Docker prune unused containers, images, and volumes
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
#!/bin/bash | |
docker rm -v $(docker ps -q --filter status=dead --filter status=exited) | |
docker rmi $(docker images -qf "dangling=true") | |
docker volume rm $(docker volume ls -qf "dangling=true") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now you can just do
docker system prune
💯