← ClaudeAtlas

clean-my-maclisted

Reclaim macOS disk space by measuring where it went, then freeing it with tool-native commands. Trigger on /clean-my-mac, "disk เต็ม" / disk full, "no space left on device" from a build or docker step, or leftover data from uninstalled apps.
atomgunlk/skills · ★ 0 · AI & Automation · score 68
Install: claude install-skill atomgunlk/skills
# Clean my mac Free real gigabytes and prove it with a before/after number. Dev machines lose space to caches and VM disk images, not to the user's files — so **measure first, and reconcile the total** before deleting anything. `du` and `df` output is the **ground truth** here. Every number you cite comes from them, never from a tool's own claim about what it freed or could free. ## Step 1 — Measure and reconcile ```bash df -h /System/Volumes/Data # the number you must move du -sh ~/* 2>/dev/null | sort -rh | head -20 du -sh ~/.[!.]* 2>/dev/null | sort -rh | head -20 # dotdirs — usually the biggest offenders du -sh /Applications /Library/Developer /opt/homebrew 2>/dev/null | sort -rh tmutil listlocalsnapshots / # space du can never see ``` Then drill into every directory over ~5G with `du -sh <dir>/* | sort -rh | head`. These scans take minutes on a full disk — give them a generous timeout, or run the `/` scan in the background. Keep any globbed path in its own command: zsh aborts the whole line on an unmatched glob, silently skipping the commands after it. **Reconcile before you act**: the dirs you named must sum to roughly the `Used` figure from `df`. Two traps hide the biggest directories: - `~/*` skips every dotdir. The single biggest item is routinely `~/.colima`, `~/.local/share/containers`, `~/.ollama`, or `~/.gemini` — invisible to the plain glob. - `du -x -d 1 /` double-counts `/System` (firmlink mirror of the