agentsclimarketplace

Macos disk space recovery

Skill narenaryan/agent-skills/skills/engineering/macos-disk-space-recovery

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 spaceFrom its SKILL.md

Install
npx -y skills add narenaryan/agent-skills --skill macos-disk-space-recovery

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.2 KB, 689 tokens by cl100k_base, as published. Nobody here has run it

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 -h

Offender map

Path familyTypical contentsDeletion risk
~/Library/Caches, app cache folders, logsrebuildable cache and logslow
~/Downloads, large project folders, archivesuser filesask first
~/Library/Application Supportapp state, downloads, modelsmedium to high
~/Library/Group Containers, ~/Library/Containerssandboxed app datahigh
~/.cache, ~/.local, ~/.ollamatool caches, package data, local modelsmedium
/private/var/vm, /private/var/dbswap, system databasesdo 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

  1. Clear low-risk caches and logs first.
  2. Identify one large app or folder family at a time.
  3. Ask before deleting anything that can remove user content or reset app state.
  4. Quit the owning app before deleting its support or container directories.
  5. 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/vm files.
  • Treat tmutil snapshots 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 df output and missing APFS container free space from diskutil.
  • 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.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,401. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.