Last active
July 20, 2017 15:44
-
-
Save your/59a7e13bdc5be7044d169da2c7c3f35d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Docker cleanup utility. | |
# Stop all containers | |
docker kill $(docker ps -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi -f $(docker images -q) | |
# Delete all dangling volumes | |
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