From 7cc5200f2403809c6e8f56b82c27189f919c0ae2 Mon Sep 17 00:00:00 2001 From: Dieter Blocher Date: Thu, 30 Jan 2025 17:17:05 +0100 Subject: [PATCH] Update README.md --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 865025c..32109fc 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,38 @@ The Container need our certificate! -> Check if this works now? # Documentation -[Documentation](./doc/README.md) \ No newline at end of file +[Documentation](./doc/README.md) + +# Docker cleanup + +1. Stop and Remove All Running & Stopped Containers + +```bash +docker stop $(docker ps -aq) # Stop all running containers +docker rm $(docker ps -aq) # Remove all containers +``` + +2. Remove All Images + +```bash +docker rmi -f $(docker images -q) # Remove all images +``` + +3. Remove All Volumes + +```bash +docker volume rm $(docker volume ls -q) # Delete all volumes +``` + +4. Remove Build Cache (BuildKit & Layers) + +```bash +docker builder prune -a -f +``` + +5. Remove All Networks (Optional) + +```bash +docker network prune -f +``` +