Dev Dust ๐งน
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.
Features
- Fast - Written in Rust for maximum performance
- Smart Detection - Automatically detects 18+ project types
- Space Saver - Reclaim gigabytes of disk space
- Beautiful CLI - Colored output with clear information
- Safe - Confirmation prompts before deletion
- Flexible - Many options for customization
Supported Project Types
Currently Supported
- Rust - Cargo projects (
target/,.xwin-cache/) - Node.js/JavaScript - npm, yarn, pnpm (
node_modules/,.next/,dist/,build/) - Python - pip, venv, pytest (
__pycache__/,.venv/,.pytest_cache/) - .NET - C#, F# projects (
bin/,obj/) - Unity - Game Engine projects (
Library/,Temp/,Obj/) - Unreal Engine - Game projects (
Binaries/,Intermediate/,Saved/) - Java Maven - Maven projects (
target/) - Java/Kotlin Gradle - Gradle projects (
build/,.gradle/) - CMake - C/C++ projects (
build/,cmake-build-*/) - Haskell Stack - Stack projects (
.stack-work/) - Scala SBT - SBT projects (
target/,project/target/) - PHP Composer - Composer projects (
vendor/) - Dart/Flutter - Flutter projects (
build/,.dart_tool/) - Elixir - Mix projects (
_build/,.elixir-tools/) - Swift - Swift Package Manager (
.build/,.swiftpm/) - Zig - Zig projects (
zig-cache/,zig-out/) - Godot - Godot 4.x projects (
.godot/) - Jupyter - Jupyter notebooks (
.ipynb_checkpoints/) - Go - Go modules (
vendor/,bin/) - Ruby - Bundler projects (
vendor/bundle/) - Terraform - Infrastructure projects (
.terraform/) - Docker - Build cache and volumes
- Bazel - Build system (
bazel-*/)
Installation
Quick Install (Recommended)
[!TIP] Use the provided installation script for the easiest setup experience. It handles building and installing devdust automatically.
# Clone the repository
# Run the installation script
The install script supports several options:
# Install to a custom directory
# Automatically install Rust if not found
# Run tests before installing
# Skip building (use existing binary)
# Uninstall devdust
# Show 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 |
Interactive Menu Mode
Running ./install.sh without arguments launches an interactive menu with colorful options:
- Install devdust - Automatically detects OS, checks/installs Rust, builds, and installs
- Uninstall devdust - Removes the installed binary
- Exit - Quit the installer
The installer includes:
- โ Automatic OS detection (Linux, macOS, Windows/WSL)
- โ Rust installation check and auto-install option
- โ Cross-platform support with proper PATH configuration
- โ Colorful, user-friendly interface
Manual Installation
From Source
# Clone the repository
# Build and install
Using Cargo
[!NOTE] Make sure
~/.cargo/binis in your PATH to use thedevdustcommand globally.
Platform-Specific Binaries
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 |
Usage
Basic Usage
# Scan current directory
# Scan specific directories
# Clean all projects without confirmation
# Dry run (show what would be deleted)
[!IMPORTANT] Always use
--dry-runfirst when scanning important directories to preview what will be deleted before actually cleaning.
Advanced Options
# Only show projects older than 30 days
# Follow symbolic links
# Stay on same filesystem (don't cross mount points)
# Quiet mode (minimal output)
# Combine options for powerful workflows
Command-Line Options Reference
| 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 |
Age Filter Examples
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.
Examples
Interactive Cleaning
)
)
Automated Cleaning
# Clean all projects older than 30 days
# Result: 12 projects cleaned, 5.4 GB freed
Safe Preview Mode
# Preview what would be deleted without actually deleting
# Output shows potential space savings without making changes
JSON Output for Scripting
# Get machine-readable output for automation
Safety Guidelines
[!CAUTION] devdust deletes files permanently. Follow these safety guidelines to avoid data loss:
Best Practices
- Always test first: Use
--dry-runto preview changes before cleaning - Start small: Test on a single project directory before scanning large areas
- Check your backups: Ensure important projects are backed up
- Review carefully: Read the list of artifact directories before confirming deletion
- Use age filters: Target old projects with
--olderto avoid cleaning active work
What Gets Deleted
devdust only deletes recognized build artifact directories. It never deletes:
- Source code files (
.rs,.js,.py, etc.) - Configuration files (
Cargo.toml,package.json, etc.) - Documentation and README files
- Git repositories (
.git/directories) - Any files outside artifact directories
What Gets Cleaned
devdust will delete these artifact directories:
- โ Build outputs (
target/,build/,dist/) - โ Dependencies (
node_modules/,vendor/) - โ Cache directories (
__pycache__/,.cache/) - โ Temporary files (
Temp/,.tmp/)
[!NOTE] All deleted artifacts can be regenerated by rebuilding your projects. devdust never touches source code or configuration files.
Building from Source
# Debug build (faster compilation, slower runtime)
# Release build (optimized for performance)
# Run tests
# Run with logging enabled
RUST_LOG=debug
# Run clippy for linting
# Format code
Running Tests
# Run all tests
# Run tests with output
# Run specific test
# Run tests in release mode
Code Style
This project follows Rust best practices and conventions:
- Comprehensive inline documentation
- Clear error handling with custom error types
- Modular design with separation of concerns
- Extensive unit tests for core functionality
- Type safety and zero-cost abstractions
- Idiomatic Rust patterns
Contributing
Contributions are welcome! Here's how you can help:
Ways to Contribute
- ๐ Report bugs: Open an issue with details about the problem
- ๐ก Suggest features: Share ideas for new functionality
- ๐ Improve documentation: Fix typos or add examples
- ๐ง Submit pull requests: Fix bugs or implement features
- โญ Star the project: Show your support on GitHub
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Run tests and linting (
cargo test && cargo clippy) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
[!TIP] Before submitting a PR, make sure all tests pass and the code is properly formatted with
cargo fmt.
Troubleshooting
Common Issues
Issue: devdust: command not found
Solution: Make sure ~/.cargo/bin is in your PATH:
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.
License
MIT License - See LICENSE file for details.
Author
Ext Rise
- Email: nayanchandradas@hotmail.com
- GitHub: extrise
- Repository: github.com/extrise/devdust
Acknowledgments
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