An open-source Rust CLI/TUI tool for developer-aware disk cleanup that scans for reclaimable space from build caches, AI models, package managers, and IDE artifacts.
diskard is a developer-aware disk cleanup tool built in Rust. It understands the structure of developer workspaces — build caches, AI model caches, package manager artifacts, IDE files — and helps reclaim disk space safely. Unlike generic disk analyzers, diskard knows what's safe to delete and what isn't, using risk-level categorization and trash-based deletion by default.
The tool provides both a CLI for scripting and an interactive TUI built with ratatui for hands-on exploration and cleanup.
Developers accumulate massive amounts of reclaimable disk space over time:
Existing tools like du or ncdu show raw disk usage but don't understand what's safe to remove. Tools like kondo focus only on build artifacts. diskard combines smart recognition across 18 categories with an interactive TUI for safe, informed cleanup.
The project uses a Rust workspace with three crates:
diskard (binary) — CLI entry point with clap-based argument parsing and command routingdiskard-core (library) — Recognizers, parallel scanner, cleaner, config system, and data typesdiskard-tui (optional feature) — Interactive terminal UI built with ratatui and crosstermEach recognizer implements a Recognizer trait (Send + Sync) with methods for name(), id(), category(), and scan(). The 18 recognizers cover:
The scanner uses rayon for parallel execution across all recognizers and jwalk for fast filesystem traversal. Each finding includes path, category, risk level (Safe/Moderate/Risky), size, description, and last modified date.
The TUI features:
Deletion defaults to moving files to Trash via the trash crate, with optional permanent deletion.
--category, --sort, --older-than~/.config/diskard/config.toml1. Recognizing Developer-Specific Artifacts
2. Safe Deletion by Default
trash crate to move files to system Trash instead of permanent deletion; TUI shows risk levels and allows drill-down inspection before confirming3. Performance at Scale
Language: Rust
Key Dependencies: clap (CLI), ratatui + crossterm (TUI), rayon + jwalk (parallelism), trash (safe deletion), serde + toml (config), bytesize (formatting), fs2 (disk stats), chrono (timestamps)
CI/CD: GitHub Actions (fmt, clippy, test on macOS + Ubuntu), Release Please for automated versioning
Distribution: crates.io (cargo install diskard), Homebrew (brew install connectwithprakash/tap/diskard)
brew install connectwithprakash/tap/diskardInteractive TUI showing scan results with 26 reclaimable items sorted by size
Item selection with checkboxes for targeted cleanup
Drill-down view inspecting Xcode DerivedData directory contents
# Install via Homebrew
brew install connectwithprakash/tap/diskard
# Or install via cargo
cargo install diskard
# Run interactive TUI
diskard -i
# Run CLI scan
diskard scan ~/Developer