DevStrip
DevStrip is a command-line utility that helps macOS developers reclaim disk space by pruning stale build products and language-specific caches. It scans common project folders under your home directory as well as any paths you provide, reports the reclaimable space, and optionally deletes the selected directories for you.
Requirements
- Rust toolchain 1.70 or newer (for
std::io::IsTerminalsupport) - macOS or a Unix-like environment with the same directory layout (the defaults target macOS developer caches)
Installation
Install the latest published release from crates.io:
You can also build and install DevStrip directly from the source.
# Install into your Cargo bin directory (usually ~/.cargo/bin)
Alternatively, build it locally and run the binary from target/release:
Usage
Run the tool from the directory you want to inspect, or provide additional roots explicitly. By default it scans the current working directory along with common project folders in your home directory (Projects, workspace, Work, Developer).
Key options:
--roots <PATH>.../ positionalPATH: additional directories to scan.--exclude <PATH>: skip a directory and everything under it.--min-age-days <u64>: only target directories older than the given age (default: 2 days).--max-depth <u32>: maximum depth to descend when scanning for project build folders (default: 5).--keep-latest-derived <usize>: keep the newest DerivedData and archive entries (default: 1).--keep-latest-cache <usize>: keep the newest Homebrew cache entries (default: 1).--dry-run: show what would be removed without deleting anything.--yes: skip the interactive confirmation prompt.--no-color: disable ANSI styling (also disabled automatically whenNO_COLORis set).
Example: perform a non-interactive cleanup of personal and work projects, while keeping two recent DerivedData folders and excluding a specific repository.
During a dry run, the tool reports all candidates and the total reclaimable space but does not delete anything:
How It Works
DevCleaner identifies large cache and build directories across several categories:
- Xcode DerivedData, Archives, and CoreSimulator caches
- Homebrew download caches
- Language-specific caches (Python, Node.js, Gradle, JetBrains IDEs, VS Code, Slack, and more)
- Project-local build artifacts like
target,node_modules,dist,coverage, etc.
It estimates sizes, sorts candidates by size, and prints a summary before asking for confirmation (unless --yes is supplied). Progress is displayed while deletions are performed, and failures are reported with the underlying OS error.
Safety Tips
- Always start with
--dry-runto review what will be deleted. - Use
--excludefor repositories or cache folders that you never want removed. - Combine
--keep-latest-derivedand--keep-latest-cacheto retain recent builds that you may still need.
Uninstall
If you previously installed DevStrip with cargo install, remove it with: