Recipes

Real-world scenarios and the fastest way to diagnose them with oops.

“My disk is full and I don’t know why”

oops ~/

One command. Shows your full disk breakdown with volume context at the top (scanned / other / free), then drills into the biggest space consumers with proportional bars. You’ll immediately see whether it’s repos, Library, Docker, or something unexpected.

To see the full disk including system files:

oops /

“What’s taking up space in this repo?”

cd ~/repos/my-project
oops .

Usually it’s target/, node_modules/, or .git/. Clean up with the tool that knows how to regenerate it:

cargo clean            # target/
rm -rf node_modules     # re-fetched by npm/yarn/pnpm install

“Where are all my node_modules?”

oops ~/ --depth 8 -n 20

Widen the map until the node_modules/ directories show up as their own line, or just target a known repos root directly:

oops ~/repos --depth 3

“Is Docker eating my disk?”

oops ~/Library/Containers/com.docker.docker

Shows you Docker.raw’s actual on-disk size (not the inflated apparent size). If it’s huge:

docker system prune -a

“Xcode is eating 50 GB again”

oops ~/Library/Developer

Clean up:

rm -rf ~/Library/Developer/Xcode/DerivedData
xcrun simctl delete unavailable
xcrun simctl runtime delete all

“What’s in ~/Library?”

~/Library is a black box. Map it:

oops ~/Library --depth 3

Common offenders:

  • Application Support/ — app data (Claude VMs, Steam games, Slack)
  • Caches/ — safe to delete, apps rebuild them
  • Containers/ — sandboxed app data (Docker lives here)
  • Developer/ — Xcode caches and simulators
  • pnpm/ — pnpm global store

“Cargo registry is huge”

oops ~/.cargo/registry

The registry cache grows with every unique dependency version. Clean old versions:

cargo cache --autoclean
# or
rm -rf ~/.cargo/registry/cache

“I freed space but disk still shows full”

macOS uses APFS purgeable space. Check with:

oops free

If the volume still shows full after deleting files, Time Machine snapshots may be holding references. macOS will purge these under pressure, or force it:

tmutil listlocalsnapshots /
tmutil deletelocalsnapshots <date>

“Where do I start on a new machine?”

oops ~/

One command. You immediately see your disk layout and where to focus cleanup — repos, caches, or Docker.

“Automated disk monitoring”

Use --plain mode for scripts:

oops free --plain 2>&1 | head -1