macos-disk-space-recovery
Skill0 starsChanged 39 days agoMITView on GitHub
Use when a Mac is low on disk space or Finder/System Data is vague - measures APFS usage, ranks real offenders, separates safe cache cleanup from risky data deletion, stops apps that recreate files, and re-measures reclaimed space
In this repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- postgres-locking-joinsSkill
- ai-bug-patternsSkill
- compressed-ndjson-boundariesSkill
- http-resume-integritySkill
- linux-io-latency-triageSkill
- minimal-sufficient-evidenceSkill
- modularize-large-filesSkill
- patch-reproducer-validitySkill
- prompt-cache-boundariesSkill
- proton-drive-selective-backupSkill
- transactional-outbox-deliverySkill
- conventional-commitsSkill
- git-advanced-mergingSkill
- git-bisect-forensicsSkill
- git-data-recoverySkill
- git-hooksSkill
- git-rerereSkill
- git-reset-mechanicsSkill
- git-revisions-syntaxSkill
- git-rewriting-historySkill
- git-submodulesSkill
- git-worktreesSkill
- github-ssh-keysSkill
- npm-publish-ci-pitfallsSkill
- sapling-stacked-pr-workflowSkill
- go-concurrency-patternsSkill
- go-data-idiomsSkill
- go-error-handlingSkill
- go-interfaces-embeddingSkill
- go-pprof-profilingSkill
- marketing-funnel-diagnosisSkill
- marketing-geo-experimentsSkill
- marketing-incrementalitySkill
- marketing-positioning-testsSkill
- python-descriptors-mroSkill
- python-logging-cookbookSkill
- python-scaling-regression-testsSkill
- python-unicode-gotchasSkill
- rust-compile-time-invariantsSkill
- rust-deterministic-concurrency-testsSkill
- rust-error-identity-boundariesSkill
- rust-regex-search-contractsSkill
- rust-runtime-bug-classesSkill
- rust-tokio-actor-deliverySkill
- rust-tokio-cancellation-safetySkill
- sales-discovery-qualificationSkill
- sales-mutual-action-plansSkill
- sales-pipeline-forecast-calibrationSkill
- sales-value-negotiationSkill
- ai-triage-evaluationSkill
- container-image-patchingSkill
- dependency-artifact-integritySkill
- dnssec-sentinel-diagnosticsSkill
- iam-policy-change-replaySkill
- rbvm-applicabilitySkill
- rbvm-asset-evidenceSkill
- rbvm-guarded-remediationSkill
- rbvm-priority-decisionsSkill
- rbvm-risk-exceptionsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat Finder storage bars as hints.
- Distinctive: line 12
Run these first and report both used and free space:
- Distinctive: line 45
Ask before deleting anything that can remove user content or reset app state.
- Distinctive: line 51
When asked to remove an app family, clarify whether the scope is:
- Distinctive: line 57
Before deleting app data, stop recreating processes:
- Very specific: line 63
If files reappear or deletion reports Directory not empty, the app or helper is still running.
- Distinctive: line 67
Prefer measured facts over generic advice.
- Very specific: line 68
Do not manually delete swap, sleep, or other /private/var/vm files.
- Very specific: line 69
Treat tmutil snapshots as a special case.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
macOS Disk Space Recovery
Treat Finder storage bars as hints. Start with APFS free space, then rank real directories by size before deleting anything.
First measurements
Run these first and report both used and free space:
df -h /
diskutil info "/System/Volumes/Data"
tmutil listlocalsnapshots /Then rank likely offenders instead of guessing:
du -hd 1 "$HOME" 2>/dev/null | sort -h
du -hd 1 "$HOME/Library" 2>/dev/null | sort -h
du -hd 1 /private/var 2>/dev/null | sort -hOffender map
| Path family | Typical contents | Deletion risk |
~/Library/Caches, app cache folders, logs | rebuildable cache and logs | low |
~/Downloads, large project folders, archives | user files | ask first |
~/Library/Application Support | app state, downloads, models | medium to high |
~/Library/Group Containers, ~/Library/Containers | sandboxed app data | high |
~/.cache, ~/.local, ~/.ollama | tool caches, package data, local models | medium |
/private/var/vm, /private/var/db | swap, system databases | do not delete manually |
Commonly missed large paths: ~/.ollama, Docker data, Xcode DerivedData, simulators, Steam libraries, Microsoft app data, JetBrains caches, WhatsApp group containers, and large image-generation app containers.
Cleanup order
- Clear low-risk caches and logs first.
- Identify one large app or folder family at a time.
- Ask before deleting anything that can remove user content or reset app state.
- Quit the owning app before deleting its support or container directories.
- Re-measure after every significant deletion and report the delta.
App-family removal pattern
When asked to remove an app family, clarify whether the scope is:
- only caches
- Library data but not
/Applications - a full uninstall including app bundles
Before deleting app data, stop recreating processes:
pgrep -ifl 'Brave|Steam|Docker|WhatsApp|OneDrive|JetBrains'If files reappear or deletion reports Directory not empty, the app or helper is still running. Quit it, then retry.
Decision rules
- Prefer measured facts over generic advice.
- Do not manually delete swap, sleep, or other
/private/var/vmfiles. - Treat
tmutilsnapshots as a special case; remove them only if they actually exist and are materially large. - Separate "space used by app data" from "app installed in
/Applications". - Quote paths with spaces such as
Library/Group Containers.
Pitfalls
- Blaming Apple update caches without checking sizes first.
- Deleting large sandbox folders while the app is still running, then assuming the cleanup failed.
- Reporting only
dfoutput and missing APFS container free space fromdiskutil. - Removing browser or editor support folders without warning that profiles, sessions, or settings may be lost.
- Deleting many categories at once and losing the ability to say which action reclaimed the space.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

