v0.3.0 Cleanups now go to the trash by default →

Reclaim gigabytes of
build junk, safely.

Dev Cleaner finds target/, .next/, __pycache__/ and friends, shows why each one matched, and moves what you pick to a trash you can undo.

$ cargo install dev-cleaner
$ dev-cleaner clean

That's it. Nothing moves until you confirm, and dev-cleaner undo brings it back.

~/acme — dev-cleaner clean
$ dev-cleaner clean
Scanning for cleanable directories...
4 cleanable directories found

  [x] Rust     api/target            180.00 MB
  [x] Node.js  web/.next              64.00 MB
  [x] Node.js  web/dist               24.00 MB
  [x] Python   ml/.pytest_cache        6.00 MB
  Space toggle | a all | / search | Enter confirm

Execution summary
  Selected: 4 (274.00 MB)
  Mode: trash (undoable)

Cleaning completed!
  Moved to trash: 274.00 MB
  Undo: dev-cleaner undo

How it works

One command. Undo anytime.

dev-cleaner clean
  • Finds build outputs and caches under the current folder.
  • Lets you pick from a keyboard list, then shows a summary.
  • Moves them to the trash when you press Enter.
dev-cleaner undo

Changed your mind? Restores the last batch exactly where it was.

Just looking? dev-cleaner scan lists findings without changing anything. Prefer a full-screen UI? dev-cleaner tui.

Why it's safe to run

Built for confident cleanup

Fast, ignore-aware scanning

Ripgrep-style parallel traversal finds candidates first, then sizes them in parallel. Only top-level targets are reported, never nested duplicates.

Undoable trash

Cleanups land in a trash batch. Undo restores it; purge frees the space.

Rule attribution

Every finding names the built-in, custom, gitignore or heuristic rule behind it.

Risk-aware defaults

Dependencies like node_modules and gitignore discoveries stay hidden unless you opt in.

CLI, TUI or macOS app

Same engine everywhere, including a native SwiftUI app (build from source).

Safety by design

It explains itself before it touches anything

  • Conservative by default. Folders with git-tracked files, recently modified or in-use projects, and anything marked .dev-cleaner-keep are skipped.
  • Provenance you can inspect. --explain shows the source, category, risk and confidence of each path.
  • Local only. Scanning, trashing and restoring all run on your machine.
{
  "project_type": "Rust",
  "category": "build",
  "risk_level": "medium",
  "confidence": "high",
  "matched_rule": { "source": "builtin", "pattern": "target" },
  "cleanable_dir": "/Users/you/acme/api/target",
  "size": 188743680,
  "in_use": false,
  "protected": false,
  "recent": false
}

Works with Mole

Mole cleans your Mac.
Dev Cleaner goes deep on your projects.

Mole handles system-wide cleanup: app caches, uninstall leftovers, System Data, installers. Dev Cleaner focuses on the build output inside your workspaces, with every removal explained and undoable. Run both.

Mole system

  • App, browser and dev-tool caches
  • Uninstall leftovers and System Data
  • Installer sweeps, disk treemap, live status
mo clean

Dev Cleaner projects

  • Undoable trash batches instead of permanent deletes
  • --explain shows the rule, risk and confidence behind each path
  • Any folder, any depth, on Linux, macOS and Windows
  • JSON plans and recommend --cleanup 10GB for scripts
dev-cleaner clean ~/code

Mole is an independent project by tw93. Dev Cleaner isn't affiliated with it, we just like it.

Reference

Commands

Everyday

dev-cleaner cleanFind, pick, move to trash.
dev-cleaner clean --dry-runPreview without changing anything.
dev-cleaner undoRestore the latest trash batch.
dev-cleaner tuiFull-screen interactive mode.

Scripts & automation

dev-cleaner plan -o plan.jsonWrite a reviewable JSON plan.
dev-cleaner apply plan.jsonApply a plan to the trash.
dev-cleaner recommend --cleanup 10GBPlan for a space goal.
dev-cleaner trash gc --keep-days 7Free space from older batches.
See all options on GitHub →