Local-first disk hygiene for macOS developer machines

Clean your machine like
you deploy code.

See exactly what 40 GB of caches costs before anything moves. Every action is previewed and scored 1–10 for danger. Filesystem cleanup lands in the Trash — recoverable until you say otherwise.

Free and open source · Apache-2.0 · macOS 13+ · latest release v0.8.2

devtrim documentation shell: graphite background, technical grid, giant DEVTRIM wordmark and semantic badges
The docs shell — same grid, same accent, same discipline.

One careful pass replaces a risky ritual.

The problem

Developer Macs fill up silently.

DerivedData, model caches, simulators, Docker layers and six-month-old node_modules quietly eat hundreds of gigabytes.

The choice

Classify before you delete.

Every target gets a danger score from 1 to 10. Rebuildable caches are amber. Unavailable simulators are caution; permanent Trash purge is red.

The boundary

Some doors have no handle.

Docker volumes are never pruned. Xcode Archives are never pruned. A typed, single deletion boundary plus a protected-path denylist no flag can override.

The result

Space you can trust back.

Filesystem paths cleaned today are recoverable from Trash until it is emptied. Permanent deletion needs explicit critical confirmation. Cleanup still carries data-loss risk: review the preview, keep backups, and grant macOS permissions manually.

Preview first. Approve once. 27.5 GB back.

Videos load only when you play them.

The devtrim interface — pick a category, read the preview, approve the exact plan. Download the demo
  1. Bare devtrim opens the Ratatui interface; every operation is labelled READ-ONLY, PREVIEW, or PERMANENT before you pick it.
  2. Selecting Caches scans first — applying is a separate, explicit step.
  3. The preview lists exact paths, danger scores, and sizes: 4 findings, 27.5 GB actionable, danger-3, TRASH-FIRST.
  4. Pressing a raises the data-loss warning and asks to confirm that exact plan; Esc cancels.
  5. The outcome reports what moved to Trash — recoverable from Finder until emptied.

One interactive TUI. Explicit commands for automation.

The Ratatui interface has shipped since v0.4.0; explicit CLI subcommands and the one-document JSON contract remain available for automation.

devtrim / tui

Keyboard-first scan, preview, and confirmation with written risk labels. It reuses the same cleanup owners and rejects CLI bypass flags.

scan

Read-only report with estimated logical sizes, danger levels, and one-document JSON output for agents.

caches

HuggingFace models, npm, Homebrew, uv. Re-downloads on demand — devtrim tells you the bandwidth cost instead of deciding.

node-modules

Applies exact previewed paths only when Git activity is conclusively older than 30 days. Unknown state is refused.

artifacts

Rust targets, virtualenvs, Pods, Gradle and bundler outputs — only with ecosystem corroboration, only in conclusively stale repos, never ambiguous names like build or dist.

history

Every apply is journaled write-ahead. Review what was attempted and what completed — interrupted applies are visible, not invisible.

xcode

DeviceSupport symbols and DerivedData. Archives are always listed but never touched.

docker

Unused images and build cache. Volumes are sacred — a volume may hold your live database.

simulators

Deletes devices whose runtime is gone. Confirmation flags never add an unpreviewed erase-all.

toolchains + leftovers

Only provably unreferenced Swift toolchains are actionable; agent leftovers are report-only review hints.

icloud

Large iCloud Drive files with logical and locally allocated sizes — a truthful storage inventory, not an upload-progress guess.

Local scans. Guardrails by default.

  • No telemetry. The binary makes zero network calls of its own.
  • Nothing leaves your machine to be "analyzed".
  • Deletion means Trash first; --shred is opt-in per run.
  • Only exact validated targets reach the single filesystem deletion sink; incomplete measurements and display strings never become authority.
  • /System, /Applications, ~/.ssh and friends are refused unconditionally — no flag overrides.
  • Piped runs refuse to mutate unless consent is explicit.
  • macOS permission prompts require your manual decision; devtrim never bypasses Privacy & Security controls.

Install v0.8.2.

Homebrew

brew install mneves75/devtrim/devtrim

Installs the attested release binary plus shell completions and the man page.

Download for Apple silicon

SHA-256 in release assets. Verify before running:

shasum -a 256 -c SHA256SUMS.txt

Build from source

git clone https://github.com/mneves75/devtrim
cd devtrim
cargo build --release --locked
cp target/release/devtrim /usr/local/bin/

Rust ≥ 1.88. No runtime dependencies beyond macOS 13+.

Run the scan you've been putting off.

It reads nothing it shouldn't, changes nothing without --apply, and keeps the safety net until you empty it. Provided AS IS; you accept the risk for applied targets.