How do you clean up Docker disk space?
docker system prune — Cleanup
docker system prune removes stopped containers, dangling images, unused networks and the build cache after a confirmation prompt. Add -a to also remove images that no container references.
Related Docker shortcuts: System
| Shortcut | Action | Notes |
|---|---|---|
| docker system prune | Cleanup | Remove unused containers, images, and networks. |
| docker volume ls | List volumes | List Docker volumes. |
| docker network ls | List networks | List Docker networks. |
| docker stats | Resource usage | Show real-time CPU and memory usage per container. |
From the Docker reference (24 entries) · all how-to answers