Last active
March 15, 2018 07:52
-
-
Save 63phc/7cedb9e18f0f9673b7d46f138dee2c94 to your computer and use it in GitHub Desktop.
docker_all_delete.sh
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
docker system prune | |
#!/bin/bash | |
# Show all <none> images | |
docker images -a | awk '/^<none>/ {print $3}' | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) -f | |
# Delete all 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