Clean Up Docker Safely
- Run
bin/docker-cleanup surveyand record Docker's total/reclaimable space plus stopped containers, dangling images, unused volumes, and build cache separately. - Read references/cleanup-policy.md. Offer export/inspection for containers or images whose purpose is unclear.
- Obtain category-specific approval. Never infer approval for volumes,
docker system prune -a, or deletion from a general request to free space. - Run only approved prune commands and repeat the survey.
- On Windows/WSL, compact the Docker VHDX only after pruning, a clean WSL shutdown, explicit elevation, and discovery of the actual disk path. On macOS, use Docker Desktop's supported reclaim behavior for the installed version.
Use agents/cleanup-reviewer.md when persistent data or an unfamiliar environment is involved.