Skip to content
Projects · Brian Rey
brianrey.xyz/projects/diskdiet.proj
All files in ProjectsProject · Finished · 2026

diskdiet

Your AI agents made your disk fat. A Rust CLI that finds what generic cleaners miss, like worktrees left by coding agents and Rust target folders, and lets you pick what goes. Anything risky starts unticked.

By · diskdiet.proj

diskdiet banner, an SSD mascot lifting a barbell next to the tagline Your AI agents made your disk fat. Put it on a diet.

My Mac went from 642 GB used to 319 GB. 105 GB of that were Rust target folders, and 60 GB sat inside ten worktrees of a single repo. Each coding agent had checked out its own copy, built it and left. No cleaner I tried knew those folders existed.

diskdiet knows a build folder from a worktree that still holds a .env you forgot about. Before it calls a worktree safe it checks commits ahead, dirty files and ignored files. Only safe items start ticked. Removing a risky worktree means typing the word delete.

It's fast because it reads folders the way Finder does, one batched system call per folder instead of one per file. A full scan of my machine takes under 8 seconds. du takes 42 on the projects folder alone. It runs on macOS and Linux.

There's a dry run that does everything except delete, so start there. Code is on GitHub.

View on GitHub

Projects · diskdiet.proj100%