Created
October 28, 2022 03:45
-
-
Save o-az/295699a66ad74b7e05d5ba2096cea8e0 to your computer and use it in GitHub Desktop.
This will delete all containers, images, and volumes
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/sh | |
# Run with: bash docker-delete-everything.sh | |
# Stop all containers | |
docker stop $(docker ps --all --quiet) | |
# Delete all containers | |
docker rm $(docker ps --all --quiet) | |
# Delete all images | |
docker rmi $(docker images --quiet) | |
# Delete all volumes | |
docker volume rm $(docker volume ls --quiet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment