| Crates.io | devdust |
| lib.rs | devdust |
| version | 1.0.1 |
| created_at | 2025-10-13 11:07:28.980924+00 |
| updated_at | 2025-10-15 22:00:52.788973+00 |
| description | Clean build artifacts from development projects to reclaim disk space |
| homepage | |
| repository | https://github.com/extrise/devdust |
| max_upload_size | |
| id | 1880383 |
| size | 46,314 |
Clean build artifacts from development projects to reclaim disk space.
Dev Dust is a fast, cross-platform command-line tool written in Rust that recursively scans directories to find development projects and cleans their build artifacts (like target/, node_modules/, __pycache__/, etc.).
[!WARNING] Dev Dust permanently deletes files and directories. Always review what will be deleted before confirming, or use
--dry-runto preview changes safely.
target/, .xwin-cache/)node_modules/, .next/, dist/, build/)__pycache__/, .venv/, .pytest_cache/)bin/, obj/)Library/, Temp/, Obj/)Binaries/, Intermediate/, Saved/)target/)build/, .gradle/)build/, cmake-build-*/).stack-work/)target/, project/target/)vendor/)build/, .dart_tool/)_build/, .elixir-tools/).build/, .swiftpm/)zig-cache/, zig-out/).godot/).ipynb_checkpoints/)vendor/, bin/)vendor/bundle/).terraform/)bazel-*/)[!TIP] Use the provided installation script for the easiest setup experience. It handles building and installing devdust automatically.
# Clone the repository
git clone https://github.com/extrise/devdust.git
cd devdust
# Run the installation script
chmod +x install.sh
./install.sh
The install script supports several options:
# Install to a custom directory
./install.sh --install-dir ~/.local
# Automatically install Rust if not found
./install.sh --auto-install-rust
# Run tests before installing
./install.sh --test
# Skip building (use existing binary)
./install.sh --skip-build
# Uninstall devdust
./install.sh --uninstall
# Show help
./install.sh --help
Available Flags:
| Flag | Description |
|---|---|
--install-dir DIR |
Specify custom installation directory (default: ~/.local/bin) |
--auto-install-rust |
Automatically install Rust if not detected |
--test |
Run test suite before installing |
--skip-build |
Skip building, use existing binary |
--uninstall |
Remove devdust from system |
--help |
Display help information |
Running ./install.sh without arguments launches an interactive menu with colorful options:
The installer includes:
# Clone the repository
git clone https://github.com/extrise/devdust.git
cd devdust
# Build and install
cargo build --release
cargo install --path devdust-cli
cargo install devdust
[!NOTE] Make sure
~/.cargo/binis in your PATH to use thedevdustcommand globally.
Pre-built binaries are available for multiple platforms via GitHub Releases:
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | devdust-linux-x86_64 |
| Linux | ARM64 | devdust-linux-aarch64 |
| macOS | Intel | devdust-macos-x86_64 |
| macOS | Apple Silicon | devdust-macos-aarch64 |
| Windows | x86_64 | devdust-windows-x86_64.exe |
# Scan current directory
devdust
# Scan specific directories
devdust ~/projects ~/work
# Clean all projects without confirmation
devdust --all
# Dry run (show what would be deleted)
devdust --dry-run
[!IMPORTANT] Always use
--dry-runfirst when scanning important directories to preview what will be deleted before actually cleaning.
# Only show projects older than 30 days
devdust --older 30d
# Follow symbolic links
devdust --follow-symlinks
# Stay on same filesystem (don't cross mount points)
devdust --same-filesystem
# Quiet mode (minimal output)
devdust --quiet
# Combine options for powerful workflows
devdust ~/projects --older 7d --all --quiet
| Option | Short | Description |
|---|---|---|
--all |
-a |
Clean all found projects without confirmation |
--follow-symlinks |
-L |
Follow symbolic links during scanning |
--same-filesystem |
-s |
Stay on the same filesystem (don't cross mount points) |
--older <TIME> |
-o |
Only show projects older than specified time |
--quiet |
-q |
Quiet mode with minimal output |
--dry-run |
-n |
Show what would be deleted without actually deleting |
--format <FORMAT> |
-f |
Output format: pretty, plain, or json |
--help |
-h |
Display help information |
--version |
-V |
Display version information |
devdust supports flexible time specifications for the --older flag:
| Format | Meaning | Example |
|---|---|---|
30m |
30 minutes | devdust --older 30m |
2h |
2 hours | devdust --older 2h |
7d |
7 days | devdust --older 7d |
2w |
2 weeks | devdust --older 2w |
6M |
6 months | devdust --older 6M |
1y |
1 year | devdust --older 1y |
[!TIP] Use the
--olderflag to target stale projects that haven't been modified recently, keeping your active projects untouched.
$ devdust ~/projects
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Dev Dust v1.0.0 โ
โ Clean Development Project Artifacts โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Scanning: /home/user/projects
Found: 5 projects with 2.3 GB of artifacts
โ my-rust-app (Rust)
Path: /home/user/projects/my-rust-app
Artifacts: 1.2 GB
Modified: 2 days ago
โ Artifact directories:
โข target
? Clean my-rust-app project? [y/N/a/q]: y
โ Cleaned 1.2 GB
โ old-website (Node.js)
Path: /home/user/projects/old-website
Artifacts: 450.5 MB
Modified: 3 months ago
โ Artifact directories:
โข node_modules
? Clean old-website project? [y/N/a/q]: y
โ Cleaned 450.5 MB
...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Summary: 3 projects cleaned, 1.8 GB freed!
# Clean all projects older than 30 days
devdust ~/projects --older 30d --all --quiet
# Result: 12 projects cleaned, 5.4 GB freed
# Preview what would be deleted without actually deleting
devdust ~/projects --dry-run
# Output shows potential space savings without making changes
# Get machine-readable output for automation
devdust ~/projects --format json --dry-run > projects.json
[!CAUTION] devdust deletes files permanently. Follow these safety guidelines to avoid data loss:
--dry-run to preview changes before cleaning--older to avoid cleaning active workdevdust only deletes recognized build artifact directories. It never deletes:
.rs, .js, .py, etc.)Cargo.toml, package.json, etc.).git/ directories)devdust will delete these artifact directories:
target/, build/, dist/)node_modules/, vendor/)__pycache__/, .cache/)Temp/, .tmp/)[!NOTE] All deleted artifacts can be regenerated by rebuilding your projects. devdust never touches source code or configuration files.
# Debug build (faster compilation, slower runtime)
cargo build
# Release build (optimized for performance)
cargo build --release
# Run tests
cargo test
# Run with logging enabled
RUST_LOG=debug cargo run
# Run clippy for linting
cargo clippy
# Format code
cargo fmt
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test
cargo test test_format_size
# Run tests in release mode
cargo test --release
This project follows Rust best practices and conventions:
Contributions are welcome! Here's how you can help:
git checkout -b feature/amazing-feature)cargo test && cargo clippy)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)[!TIP] Before submitting a PR, make sure all tests pass and the code is properly formatted with
cargo fmt.
Issue: devdust: command not found
Solution: Make sure ~/.cargo/bin is in your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Issue: Permission denied when cleaning
Solution: Some artifact directories may require elevated permissions. Run with appropriate permissions or skip those projects.
Issue: Symbolic links not followed
Solution: Use the --follow-symlinks flag to traverse symbolic links during scanning.
MIT License - See LICENSE file for details.
Ext Rise
devdust was built from scratch with modern Rust practices, inspired by similar tools in the ecosystem. Special thanks to the Rust community for excellent libraries like clap, walkdir, and colored.
Made with โค๏ธ and Rust | Report Issues | View Releases