Created
March 19, 2025 03:57
-
-
Save broisnischal/042b994e99fe64cd0fee055e8e793632 to your computer and use it in GitHub Desktop.
Clean up docker
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
# Stop all running containers | |
docker stop $(docker ps -q) | |
# Remove all containers | |
docker rm -f $(docker ps -aq) | |
# Remove all images | |
docker rmi -f $(docker images -aq) | |
# Remove all volumes | |
docker volume rm $(docker volume ls -q) | |
# Remove all networks (except default ones) | |
docker network prune -f | |
# Clean up build cache | |
docker system prune -af --volumes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment