A powerful macOS desktop application for cleaning up development caches and temporary files, built with Rust and GPUI.
DevSweep helps you reclaim disk space by safely removing caches and temporary files created by development tools like Docker, Homebrew, Node.js, Python, Rust, Xcode, and more. Built with modern Rust and the GPUI framework (from Zed editor), it provides a fast, native macOS experience.
- Smart Scanning: Primary "Scan" button uses cache for instant results
- Full Rescan Option: Secondary "Full Rescan" link for complete fresh analysis
- Intelligent Caching: Detects file changes and cache expiration automatically
- 16+ Categories: Organized by tool (Docker, Node.js, Python, Xcode, etc.)
- Size Visualization: Shows exact size for each item and category
- Selective Cleanup: Choose exactly what to delete with checkboxes
- Scrollable Content: Smooth scrolling through large result sets
- Safety Warnings: Highlights potentially risky items
- Responsive UI: Non-blocking operations with immediate visual feedback
- Click Feedback: All buttons provide tactile feedback on interaction
- Safe Deletion: Files are quarantined instead of permanently deleted
- Undo Support: Restore deleted files with one click (per record)
- Individual Item Deletion: Delete specific quarantined items permanently
- Cleanup History: View all past cleanup operations with timestamps
- Expandable Records: Click to see all items in each cleanup operation
- Bulk Operations:
- "Undo All" button per record to restore all items
- "Delete All" button to clear entire quarantine
- Storage Stats: Real-time quarantine size and item count
- Scrollable History: Navigate through long cleanup history
- Smart Cleanup: Automatically removes old quarantine when exceeding 10GB
- Cache TTL Configuration: Customize how long scan results are cached per category
- Per-Category Control: Set different TTL values for each tool category
- Reset to Defaults: Quick button to restore default settings
- Persistent Settings: All settings saved and restored on app restart
- Scrollable Interface: Easy navigation through all settings
- App Information: Version 0.2.0, description, and credits
- Feature List: Complete overview of capabilities
- Technology Stack: Built with Rust + GPUI
- Clean Design: Centered layout with app logo
- Parallel Scanning: Multi-threaded analysis using Rayon
- Smart Caching: Remembers previous results with configurable TTL
- Path Tracking: Detects file system changes to invalidate cache
- Background Operations: All I/O runs in background threads
- Instant UI Response: GPUI ensures smooth 60fps interface
- Optimized Builds: LTO and optimizations enabled for release builds
The app scans and cleans the following (16 categories):
- Docker - Images, containers, volumes, build cache
- Homebrew - Cache, downloads, old versions, logs
- Node.js/npm/yarn - Global cache, yarn cache
- Python - pip cache, pycache folders, virtualenvs
- Rust/Cargo - Registry cache, git checkouts, target directories
- Xcode - DerivedData, archives, device support
- Java (Gradle/Maven) - Gradle cache, Maven repository
- Go - Build cache, module cache
- IDE Caches - VS Code, JetBrains IDEs, Sublime Text
- Shell Caches - Oh My Zsh, Powerlevel10k, zsh plugins
- Database Caches - PostgreSQL, MySQL, MongoDB, Redis logs
- System Logs - Crash reports, diagnostic reports, app logs
- Browser Caches - Safari, Chrome, Brave, Firefox, Edge, Arc, Opera, Vivaldi
- node_modules in Projects - Project dependencies (~/Documents, ~/Projects)
- General Caches - Large application caches
- Trash - User trash contents
- Download the latest
.dmgfrom releases - Open the DMG file
- Drag "DevSweep.app" to Applications folder
- Right-click the app and select "Open" (first time only, macOS Gatekeeper)
- Grant Full Disk Access in System Preferences → Privacy & Security → Full Disk Access
Requirements:
- macOS 11.0 (Big Sur) or later
- Rust 1.70+ (install via rustup)
- Xcode Command Line Tools
# Clone the repository
git clone https://github.com/canggihpw/devsweep.git
cd devsweep
# Build release version
cargo build --release
# Run the app
./target/release/devsweep# Build and create .app bundle + .dmg installer
./create-app-bundle.sh
# This creates:
# - DevSweep.app (macOS app bundle)
# - DevSweep-0.2.0.dmg (ready to distribute)- Launch the app from Applications or Spotlight
- Scan your system:
- Click "Scan" for quick cached scan (instant if cache valid)
- Click "Full Rescan" for complete fresh analysis
- Review the results in expandable categories
- Select items you want to clean using checkboxes
- Use "Select All" / "Deselect All" for bulk operations
- Clean selected items with the "Clean Selected" button
- Undo if needed from the Quarantine tab
- Primary action: "Scan" button (uses cache for speed)
- Secondary action: "Full Rescan" link (bypasses cache)
- Click category headers to expand/collapse items
- Check categories to select all items within
- Individual item selection with checkboxes
- "Safe" badges indicate low-risk deletions
- Warning (⚠) badges for items needing caution
- View all cleanup operations with timestamps
- Click record headers to expand and see individual items
- Per-record actions:
- "Undo All" - restore all items from that cleanup
- Per-item actions:
- "Delete" button - permanently delete individual items
- Global actions:
- "Delete All" - clear entire quarantine
- "Refresh" - update quarantine view
- "Open in Finder" - browse quarantine directory
- ✓ Green checkmark = successful operation
- ✗ Red X = failed operation with error message
- Configure cache TTL (Time To Live) for each category
- 0 minutes = always rescan (no cache)
- Higher values = faster subsequent scans
- "Reset to Defaults" restores recommended settings
- All settings persist between app launches
- App version and description
- Feature highlights
- Technology stack information
- Credits and acknowledgments
When you clean files, they're moved to quarantine (not deleted):
- Location:
~/Library/Caches/development-cleaner/quarantine/ - Duration: Until you "Undo All" or "Delete All"
- Auto-cleanup: Quarantine cleared when exceeding 10GB
- Individual control: Delete specific items with "Delete" button
- Record-level undo: "Undo All" per cleanup operation
- Safety: Original paths preserved for accurate restoration
Note: Items deleted via commands (not file paths) cannot be quarantined and are permanent.
✅ Safe to delete (marked with "Safe" badge):
- npm/yarn/pip caches
- Docker build cache
- Homebrew downloads
- Browser caches
- Temporary build files
- Docker images/containers you're actively using
- Python virtualenvs for current projects
- Database data (marked with warnings)
- node_modules in active projects
🛡️ Always safe with quarantine:
- All file-based deletions can be undone
- Review quarantine history before "Delete All"
- Individual item deletion for precise control
Best practice:
- Start with cached scans ("Scan" button)
- Review results carefully
- Clean conservatively at first
- Check quarantine before permanent deletion
- Use "Full Rescan" periodically for accuracy
- macOS: 11.0 (Big Sur) or later (GPUI requirement)
- Rust: 1.70 or later
- Xcode Command Line Tools:
xcode-select --install - Git: For cloning the repository
# Development build (with debug symbols)
cargo build
# Release build (optimized)
cargo build --release
# Run directly
cargo run --release
# Run with logging
RUST_LOG=debug cargo run --releaseThe create-app-bundle.sh script automates app bundle creation:
# Make script executable (first time)
chmod +x create-app-bundle.sh
# Build app bundle and DMG
./create-app-bundle.shThis script:
- ✅ Generates app icon from SVG (if needed)
- ✅ Builds release binary
- ✅ Creates .app bundle structure
- ✅ Adds Info.plist with metadata
- ✅ Code signs with entitlements (ad-hoc)
- ✅ Creates distributable DMG
- ✅ Adds README to DMG
The app requires Full Disk Access to scan all directories:
- Open System Preferences → Privacy & Security
- Select Full Disk Access in the sidebar
- Click the + button
- Add DevSweep.app
- Restart the app
devsweep/
├── src/
│ ├── main.rs # App entry point
│ ├── lib.rs # Library exports
│ ├── single_instance.rs # Unix socket single-instance handling
│ ├── assets.rs # Embedded assets (rust-embed + image loading)
│ ├── backend.rs # Core scanning and cleanup logic
│ ├── types.rs # Data structures
│ ├── utils.rs # Helper functions
│ ├── scan_cache.rs # Cache management with TTL
│ ├── cleanup_history.rs # Quarantine and undo system
│ ├── cache_settings.rs # Settings persistence
│ ├── app/ # GPUI application components
│ │ ├── mod.rs # Module exports
│ │ ├── state.rs # Application state (DevSweep struct)
│ │ ├── actions.rs # Action handlers (scan, clean, etc.)
│ │ ├── render.rs # Main UI rendering, sidebar
│ │ └── tabs/ # Tab-specific UI
│ │ ├── mod.rs
│ │ ├── scan_tab.rs
│ │ ├── quarantine_tab.rs
│ │ ├── settings_tab.rs
│ │ └── about_tab.rs
│ ├── checkers/ # Category-specific scanners
│ │ ├── mod.rs
│ │ ├── docker.rs
│ │ ├── homebrew.rs
│ │ ├── nodejs.rs
│ │ ├── python.rs
│ │ ├── rust_cargo.rs
│ │ ├── xcode.rs
│ │ ├── java.rs
│ │ ├── go.rs
│ │ ├── ide.rs
│ │ ├── shell.rs
│ │ ├── db.rs
│ │ ├── logs.rs
│ │ ├── browser.rs
│ │ └── general.rs
│ └── ui/
│ ├── mod.rs
│ ├── sidebar.rs # Tab definitions and icons
│ └── theme.rs # Catppuccin Latte/Mocha colors
├── assets/
│ ├── image-dark.svg # Logo for light theme
│ ├── image-light.svg # Logo for dark theme
│ ├── icon-dark.png # Generated icon for light theme
│ ├── icon-light.png # Generated icon for dark theme
│ └── logo.icns # macOS app bundle icon
├── scripts/
│ ├── create-app-bundle.sh # Bundle + DMG creator
│ ├── create-icon.sh # Icon generator from SVG
│ └── entitlements.plist # macOS permissions
├── docs/ # Documentation
└── Cargo.toml # Dependencies
- Rust - Systems programming language
- GPUI - GPU-accelerated UI framework from Zed
- Rayon - Data parallelism
- Serde - Serialization framework
- WalkDir - Recursive directory traversal
- Chrono - Date and time handling
- rust-embed - Embed assets in binary
- image - Image decoding for icons
- Catppuccin - Latte/Mocha theme palettes
-
Initial Scan:
- User clicks "Scan" button
- Checks cache validity (TTL not expired, files unchanged)
- Returns cached results instantly if valid
-
Cache Invalidation:
- Tracks file metadata (modification times, sizes)
- Detects when directories change
- Respects per-category TTL settings
-
Full Rescan:
- User clicks "Full Rescan" link
- Bypasses cache completely
- Scans all categories fresh
- Updates cache with new results
-
Parallel Processing:
- All category checks run in parallel using Rayon
- Results collected and merged
- UI updated on main thread
-
Deletion:
- Files moved to
~/Library/Caches/development-cleaner/quarantine/ - Original paths stored in cleanup record
- Timestamp and metadata preserved
- Individual items tracked with indices
- Files moved to
-
Record Structure:
- Each cleanup operation creates a record
- Contains: timestamp, item list, success/error counts
- Items marked as: quarantined, permanently deleted, or failed
-
Restoration:
- "Undo All" per record: restores all items from that cleanup
- Items moved back to original locations
- Parent directories created if missing
- Errors reported for conflicts
-
Individual Deletion:
- "Delete" button on each quarantined item
- Permanently removes from quarantine
- Updates record to mark as deleted
- Cannot be undone after this point
-
Automatic Cleanup:
- Monitors quarantine directory size
- Removes oldest records when exceeding 10GB
- Maintains 80% of limit after cleanup
- Scan Cache:
~/Library/Caches/development-cleaner/scan_cache.json - Cleanup History:
~/Library/Caches/development-cleaner/cleanup_history.json - Settings:
~/Library/Application Support/development-cleaner/cache_settings.json - Quarantine Files:
~/Library/Caches/development-cleaner/quarantine/
Symptom: Some directories show as empty or inaccessible
Solution:
- System Preferences → Privacy & Security → Full Disk Access
- Add DevSweep.app
- Restart the app
Symptom: macOS Gatekeeper blocks the app
Solution:
- Right-click DevSweep.app
- Select "Open"
- Click "Open" in the dialog
- For subsequent launches, double-click works normally
Symptom: Clicking "Scan" doesn't respond
Solution:
- Wait for current operation to complete
- Look for status in header (e.g., "Scanning..." or "Cleaning...")
- Buttons are disabled during operations to prevent conflicts
- This is a feature, not a bug!
Symptom: Scan results don't reflect recent changes
Solution:
- Click "Full Rescan" to bypass cache
- Or adjust TTL in Settings tab to 0 for always-fresh results
- Cache auto-invalidates when files change, but may miss some updates
Common issues:
# GPUI dependency issue
cargo clean
cargo update
cargo build --release
# macOS SDK issue
xcode-select --install
# Rust version too old
rustup update stableThe app is automatically signed with ad-hoc signature:
# Already done by create-app-bundle.sh
codesign --force --deep --sign - --entitlements entitlements.plist "DevSweep.app"Requires Apple Developer account ($99/year):
# Sign with Developer ID
codesign --force --deep \
--sign "Developer ID Application: Your Name (TEAM_ID)" \
--entitlements entitlements.plist \
--options runtime \
"DevSweep.app"
# Sign DMG
codesign --sign "Developer ID Application: Your Name (TEAM_ID)" \
"DevSweep-0.2.0.dmg"
# Notarize (required for distribution)
xcrun notarytool submit "DevSweep-0.2.0.dmg" \
--apple-id "your@email.com" \
--team-id "TEAM_ID" \
--password "app-specific-password"
# Staple notarization ticket
xcrun stapler staple "DevSweep-0.2.0.dmg"- Cached scan: < 100ms (instant)
- Full rescan: 2-10 seconds (depending on system)
- 16 categories scanned in parallel
- ~1-2 GB/sec throughput on modern SSDs
- App size: ~15-20 MB
- Cache storage: < 1 MB typically
- Quarantine: Up to 10 GB (auto-cleanup)
- Settings: < 1 KB
Typical space reclaimed:
- Light users: 5-20 GB
- Active developers: 50-200 GB
- Heavy Docker/Node.js users: 200+ GB
- Memory: 50-100 MB during idle
- CPU: < 5% during UI interaction
- Disk I/O: Minimal (read-only scanning)
- GPU: GPUI uses Metal for rendering
- Dark mode: Toggle between light/dark themes
- Uses Catppuccin Latte (light) and Mocha (dark) palettes
- Theme-aware icons that adapt to current mode
- Single-instance app: Prevents multiple windows when reopening
- Comprehensive testing: 332 tests with 57% line coverage (excluding UI)
- Performance benchmarks: Cached scans complete in < 100ms
- Custom scan paths: Add your own directories to scan
- Scheduled cleanups: Automatic cleaning on schedule
- Size threshold filters: "Show only items > 1 GB"
- Export reports: Save scan results as CSV/JSON
- Cloud storage cleanup: Google Drive, Dropbox, iCloud caches
- Smart recommendations: AI-based cleanup suggestions
- Menu bar mode: Quick access from menu bar
- Whitelist/blacklist: Exclude specific paths
- Cleanup profiles: Save and load cleanup configurations
- Git repository cleanup: Old branches, stale remotes
- Language server caches: LSP data, TypeScript servers
- Build artifact cleanup: Old build outputs, artifacts
- Trash schedule: Auto-empty trash older than X days
- Storage trends: Visualize space usage over time
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
- GPUI Framework: Thanks to Zed team for the amazing UI framework
- Catppuccin Latte: Beautiful light mode color scheme
- Rust Community: Excellent ecosystem and tools
- macOS Developer Community: Inspiration from various cleanup tools
This tool modifies and deletes files on your system. While it includes safety features (quarantine, undo, warnings), use at your own risk. Always review what you're deleting and maintain backups of important data.
The quarantine system provides a safety net, but files can be permanently deleted with "Delete" or "Delete All" actions. These operations cannot be undone.
Recommended workflow:
- Use "Scan" for quick cached results
- Review selections carefully
- Clean conservatively
- Verify quarantine before permanent deletion
- Use "Full Rescan" when you need fresh data
Q: Is it safe to delete everything marked as "Safe"?
A: Generally yes, but review the list. These are caches and temporary files that can be regenerated.
Q: Will cleaning break my development environment?
A: No, but you may need to re-download packages or rebuild projects. The quarantine system lets you undo if issues arise.
Q: How often should I run this?
A: Weekly or monthly for active developers. Use "Scan" for quick checks, "Full Rescan" monthly.
Q: Can I recover deleted files?
A: Yes! Use "Undo All" in the Quarantine tab before clicking "Delete All". Individual items can also be restored or deleted.
Q: Why does it need Full Disk Access?
A: To scan system directories, caches, and your home folder. This permission is required by macOS.
Q: What's the difference between "Scan" and "Full Rescan"?
A: "Scan" uses cached results for speed (instant if cache valid). "Full Rescan" bypasses cache for complete fresh analysis.
Q: Does the quarantine take up space?
A: Yes, up to 10 GB. It auto-cleans when exceeding this limit. You can manually "Delete All" anytime.
Q: Can I customize which categories to scan?
A: Currently all categories are scanned. Use checkboxes to select what to clean. Custom scan paths are planned.
Q: Is my data sent anywhere?
A: No. Everything runs locally. No telemetry, no network requests, no data collection.
Q: Why GPUI instead of other UI frameworks?
A: GPUI provides native macOS performance with GPU acceleration, smooth 60fps, and is built for developer tools.
Built with ❤️ using Rust and GPUI
For issues, feature requests, or contributions, visit the GitHub repository.