name: mac-disk-pressure-recovery
Use this skill to run a fast, safe disk-pressure investigation on macOS and reclaim space with minimal risk.
ENOSPC or low free spacedf, du) and keep before/after numbers.Operation not permitted, continue with deletable targets and report skipped paths.df -h / /System/Volumes/Data
Urgent threshold:
/System/Volumes/Data free < 15 GiB, orRun the bundled report script first:
./scripts/disk_hotspots.sh
Or manual probes:
du -h -d 1 "$HOME" | sort -hr | head -n 40
du -h -d 1 "$HOME/Library" | sort -hr | head -n 40
du -h -d 1 /Library | sort -hr | head -n 30
du -h -d 1 /Applications | sort -hr | head -n 30
du -h -d 1 /private | sort -hr | head -n 30
Use dry-run first:
./scripts/cleanup-safe-caches.sh
Apply:
./scripts/cleanup-safe-caches.sh --apply
This targets:
~/Library/Caches (best effort)~/.npm/_cacache, ~/.npm/_npx~/.gradle/caches, ~/.gradle/wrapper/dists~/Library/Developer/Xcode/DerivedData~/.cachebrew cleanup -s, pnpm store pruneFrom this incident, a major leak pattern was Chrome code-sign clones under /private/var/folders.
Inspect:
./scripts/cleanup-chrome-code-sign-clone.sh
Apply cleanup:
./scripts/cleanup-chrome-code-sign-clone.sh --apply
Notes:
Only do these after explicit approval:
/Library/Developer/CoreSimulator pruning/resetndk, system-images, old platforms)~/backup/*)/Applicationsdf -h /System/Volumes/Data
Always report:
/private/var/folders 配下の com.google.Chrome.code_sign_clone が数十GiB に膨れることがある。cleanup-chrome-code-sign-clone.sh で定期的にチェックすることOperation not permitted で作業を止める: SIP(System Integrity Protection)で保護されたパスは削除できない。エラーが出ても削除可能なターゲットで作業を続行し、スキップしたパスを報告することdf -h でベースラインを取り、作業後にも必ず実行する。数値なしでは成果が分からないreferences/case-chrome-code-sign-clone.md: concrete case notes from this incident.