| Crates.io | deepclean |
| lib.rs | deepclean |
| version | 0.1.0 |
| created_at | 2026-01-05 07:28:22.897267+00 |
| updated_at | 2026-01-05 07:28:22.897267+00 |
| description | A fast, parallel tool to clean Rust projects and remove unused dependencies |
| homepage | |
| repository | https://github.com/yingkitw/deepclean.git |
| max_upload_size | |
| id | 2023297 |
| size | 91,906 |
A fast, parallel tool to clean Rust projects and remove unused dependencies
Rust projects can accumulate gigabytes of build artifacts in target/ directories. When you have multiple projects or workspaces, manually cleaning them is tedious and time-consuming. Plus, unused dependencies bloat your Cargo.toml and slow down builds.
deepclean solves this by:
Cargo.toml clean# Clone the repository
git clone https://github.com/yingkitw/deepclean.git
cd deepclean
# Install as a cargo plugin
cargo install --path .
# Now use it!
cargo deepclean
Note: Make sure ~/.cargo/bin is in your PATH.
# Clean current directory and all subdirectories
cargo deepclean
# Clean a specific directory
cargo deepclean /path/to/projects
# Preview what would be cleaned (dry run)
cargo deepclean --dry-run
# Only clean projects above 100MB
cargo deepclean --min-size 100MB
# Check for unused dependencies
cargo deepclean --clean-deps
# Remove unused dependencies (automatically checks first)
cargo deepclean --remove-deps
| Option | Description |
|---|---|
-j, --jobs <N> |
Number of parallel jobs (default: CPU count) |
-e, --exclude <PATTERN> |
Exclude directories matching pattern (can use multiple times) |
--dry-run |
Preview mode (doesn't actually clean) |
--min-size <SIZE> |
Only clean projects above this size (e.g., "100MB", "1GB") |
--clean-deps |
Check for unused dependencies |
--remove-deps |
Remove unused dependencies (requires cargo-remove) |
-v, --verbose |
Verbose output |
--json |
Output results as JSON |
To remove unused dependencies, install cargo-edit:
cargo install cargo-edit
Note: Dependency detection is built-in and doesn't require external tools! The tool parses Cargo.toml and searches your source code to find unused dependencies.
cargo deepclean
cargo deepclean --min-size 500MB
cargo deepclean --clean-deps
cargo deepclean --remove-deps
cargo deepclean --exclude "**/target/debug" --exclude "**/node_modules"
cargo deepclean -j 8
cargo-metadatatarget/ directories in parallelCargo.toml and searches source code for unused dependenciescargo-remove to clean up unused dependenciesdeepclean is built in Rust for maximum performance:
Contributions are welcome! Feel free to open issues or submit pull requests.
Apache-2.0