agentleFS
ericpardeeericpardee/agent-files/skills/freeing-disk-space/SKILL.md

freeing-disk-space

Skill3 starsChanged 4 months agoMITView on GitHub

Use when a Mac is running low on disk space or storage is full - "startup disk almost full", "only X GB left", "free up space", "what is eating my disk", "clean up my Mac", or /freeing-disk-space. macOS only.

  • Deletes or force-pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. bostonaholic/skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only scanning is pre-authorized.

    line 16
  2. Very specific:

    Start with a full top-level sweep so nothing named or unnamed escapes: du -xsm ~/* | sort -rn | head -20 and du -xsm ~/.[!.]* | sort -rn | …

    line 21

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Freeing Disk Space (macOS)

Measure, then recommend; never guess. Rank findings by measured size and reversibility, gate every deletion behind line-item approval, verify with df.

Ground truth

  • The real number is Avail from df -h /System/Volumes/Data. Finder and About This Mac add purgeable space, so they read tens of GB higher. Quote the df number and say which one you are quoting.
  • Read-only scanning is pre-authorized. Nothing gets deleted, moved, or shrunk until the user approves specific line items.

Survey pass

Start with a full top-level sweep so nothing named or unnamed escapes: du -xsm ~/* | sort -rn | head -20 and du -xsm ~/.[!.]* | sort -rn | head -15. This is what catches sync folders (Dropbox, ~/Library/CloudStorage), forgotten archive dirs, and tool dotdirs (~/.codex ~/.asdf ~/.npm ~/.cache ~/.ollama ~/.lmstudio ~/.docker). Always use -x so du does not cross into mounts.

Then drill winners with du -xsm <dir>/* | sort -rn | head, always including:

  • ~/Library/Caches ~/Library/Application Support ~/Library/Containers ~/Library/Group Containers ~/Library/Developer (du of ~/Library top-level first, these five are the usual winners)
  • One-shot checks: tmutil listlocalsnapshots /, brew cleanup -n, iOS backups at ~/Library/Application Support/MobileSync/Backup
  • Skip ~/Library/Mobile Documents (iCloud placeholders make sizes meaningless)
  • Fully-synced sync-client folders (Dropbox, iCloud) are often the largest single item and are move-not-delete: flag for online-only offload, never rm

Known heavyweights

FindingReclaim with
Browser caches under ~/Library/Caches/Quit browser, rm -rf the cache dir; it regenerates. Never touch the browser's Application Support profiles (passwords, sessions)
Homebrew cache + old versionsbrew cleanup --prune=all -s
iOS simulators (~/Library/Developer/CoreSimulator)xcrun simctl delete unavailable, or delete all
Xcode DerivedData, iOS DeviceSupportrm -rf; rebuilt on demand
Docker.raw in ~/Library/Containers/com.docker.dockerdocker system prune -a then shrink disk image in Docker settings; if Docker is unused, uninstall or purge data
VM bundles (UTM, Parallels)Move the bundle to an external drive or delete inside the app
node_modules / venvs`fd -HI -t d '^(node_modules.venvvenv)$' --prune . <code-dir> -x du -xsm {} | sort -rn`; delete for inactive repos, rebuild with npm/uv
Time Machine local snapshotstmutil deletelocalsnapshots <date> only if the listing showed any
Fully-synced Dropbox / iCloud foldersMake Available Online Only / Optimize Mac Storage (a move, not a delete)
Messages attachmentsSystem Settings > General > Storage > Messages; warn that iCloud sync propagates deletions to all devices

Output contract

Present one ranked table: item, measured size, tier, exact command. Tiers: (1) regenerable cache, (2) rebuildable artifact, (3) likely unused, needs confirmation, (4) personal data, recommend move not delete. End by asking which line items to execute. After executing approved items only, show before and after df -h Avail as evidence.

Common mistakes

  • Quoting Finder free space, or mixing purgeable into the target.
  • Deleting a browser's Application Support instead of its Caches.
  • Recommending snapshot or iOS-backup purges without checking they exist.
  • Clearing caches of running apps; quit the app first.
  • Forgetting hidden dotdirs and ~/Library/Containers (Docker, VMs, and Messages data live there).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.