Professional developer cache cleaner for macOS, Linux, and Windows
Reclaim gigabytes of disk space safely and intelligently
DevSweep is a production-grade CLI tool that safely cleans deep system caches, helping developers reclaim valuable disk space without compromising system stability.
๐ข Migration in Progress: DevSweep is migrating from Bash (v1.x, macOS only) to .NET 10 AOT (v2.x, cross-platform). See PROGRESS.md for details.
| Version | Platform | Status | Location |
|---|---|---|---|
| v1.x (Bash) | macOS only | โ Production | bash/ |
| v2.x (.NET 10 AOT) | macOS, Linux, Windows | ๐ง In Development | net/ |
Current stable version: v1.x (Bash) - Fully functional, production-ready Future version: v2.x (.NET) - Cross-platform, hexagonal architecture, MCP server support
- ๐จ JetBrains IDEs - Removes old versions, keeps latest, cleans corrupted caches (~2-5GB)
- ๐ณ Docker/OrbStack - Containers, images, volumes, and build cache (~5-20GB)
- ๐บ Homebrew - Old package versions, unused dependencies, download cache (~500MB-2GB)
- โ๏ธ Dev Tools - Maven, Gradle, npm, yarn, pnpm, pip caches (~5-15GB)
- ๐๏ธ System (Coming soon) - System logs and caches
Average recovery: 10-30GB of disk space
- ๐ก๏ธ Safety First: Built-in
--dry-runand--analyzemodes to preview all actions - ๐๏ธ Interactive Menu: User-friendly interface for guided cleanup
- ๐ง Modular Architecture: Clean, testable, extensible codebase
โ ๏ธ Double Confirmation: Explicit approval for destructive operations- ๐ Smart Analysis: Shows estimated space to be recovered before cleaning
- ๐จ Beautiful Output: Colored, organized logging with progress indicators
- โ Well Tested: 115 tests, 100% passing, optimized for speed
- ๐ Fast: Optimized for performance, completes in seconds
Note: These instructions are for v1.x (Bash). v2.x (.NET) installation will be documented when available.
# Add the tap
brew tap sstark97/tap
# Install DevSweep
brew install devsweep# Clone and install locally (no sudo required)
git clone https://github.com/Sstark97/dev_sweep.git
cd dev_sweep/bash
make install-local
# Verify installation
devsweep --versionThe command will be available at ~/.local/bin/devsweep
git clone https://github.com/Sstark97/dev_sweep.git
cd dev_sweep/bash
sudo make install
# Available globally
devsweep --version# Homebrew
brew uninstall devsweep
brew untap sstark97/tap
# Local installation (from bash/ directory)
cd dev_sweep/bash
make uninstall-local
# System-wide
sudo make uninstall# Interactive mode - guided cleanup
devsweep
# Analyze mode - see what can be cleaned with size estimates
devsweep --analyze --all
# Safe preview - see detailed actions without deleting
devsweep --dry-run --all
# Clean everything (with confirmations)
devsweep --alldevsweepLaunches an interactive menu to select which modules to run.
# Analyze mode - preview with size estimates (recommended first step)
devsweep --analyze --all
# Run all cleanup modules (with confirmations)
devsweep --all
# Safe preview mode - see detailed actions, no files deleted
devsweep --dry-run --all
# Clean specific modules
devsweep --jetbrains
devsweep --docker --homebrew
# Skip confirmations (use with caution!)
devsweep --force --all
# Verbose output
devsweep --verbose --jetbrains| Flag | Short | Description |
|---|---|---|
--help |
-h |
Show help message |
--version |
-v |
Show version |
--analyze |
-a |
Analyze and show cleanup preview with size estimates |
--dry-run |
-d |
Preview mode - shows detailed actions, no deletions |
--verbose |
Detailed output | |
--force |
-f |
Skip confirmations |
--all |
-a |
Run all cleanup modules |
--jetbrains |
Clean JetBrains IDEs only | |
--docker |
Clean Docker/OrbStack only | |
--homebrew |
Clean Homebrew only | |
--devtools |
Clean dev tools (Maven, Gradle, Node) | |
--system |
Clean system caches and logs |
# Recommended workflow: Analyze first, then clean
devsweep --analyze --all # See what can be cleaned
devsweep --all # Clean with confirmations
# Safe exploration - see detailed actions
devsweep --dry-run --all
# Clean only JetBrains with preview
devsweep --jetbrains --verbose
# Full cleanup of dev tools
devsweep --devtools --docker --homebrew
# Clean everything (skip confirmations - use with caution!)
devsweep --force --all- ๏ฟฝ Analyze Mode: Preview what can be cleaned with size estimates before any action
- ๐ Dry-Run Mode: See detailed actions without making changes
- โ Interactive Confirmations: Explicit approval for destructive operations
- ๐ Smart Validation: Prevents accidental deletion of critical paths
- ๐ Detailed Logging: Full transparency of all actions taken
- ๐พ Version Preservation: Automatically keeps latest IDE versions
- โก Graceful Handling: Safely handles missing tools and empty caches
Note: These instructions are for v1.x (Bash). For v2.x (.NET) development, see PROGRESS.md.
- macOS 10.15+
- Bash 5.0+
- bashunit 0.32.0+ for testing
# Clone repository
git clone https://github.com/Sstark97/dev_sweep.git
cd dev_sweep/bash
# Install dependencies
make setup
# Run tests
make test# Run all tests (123 tests, ~12.2s)
make test
# Run specific test suite
./bashunit tests/unit/jetbrains_test.sh
# Watch mode (requires fswatch)
make watch-testmake help # Show all available commands
make test # Run all tests
make lint # Run shellcheck
make check # Syntax validation
make install-local # Install locally
make clean # Remove temporary filesdev_sweep/
โโโ bash/ # v1.x - Bash version (macOS only)
โ โโโ bin/
โ โ โโโ devsweep # Main entry point
โ โโโ src/
โ โ โโโ modules/ # Cleanup modules
โ โ โโโ utils/ # Shared utilities
โ โโโ tests/ # 123 tests (112 unit + 11 e2e)
โ โโโ Makefile # Build automation
โ โโโ .bashunit.yml # Test configuration
โโโ net/ # v2.x - .NET 10 AOT (cross-platform) [Coming soon]
โโโ PROGRESS.md # Migration roadmap
โโโ README.md # This file
โโโ CONTRIBUTING.md # Contribution guidelines
To enforce code quality, configure branch protection rules for the main branch:
- Go to Settings โ Branches โ Branch protection rules
- Click Add rule for
mainbranch - Configure the following settings:
- โ Require a pull request before merging
- โ
Require status checks to pass before merging
- Add required check:
test(from Tests workflow)
- Add required check:
- โ Require branches to be up to date before merging
- โ Do not allow bypassing the above settings (recommended)
This ensures that all PRs must pass the automated test suite before they can be merged.
# Complete automated release workflow
make publish VERSION=1.0.0This command:
- โ Runs all tests
- โ Creates release tarball
- โ Creates and pushes git tag
- โธ๏ธ Pauses for GitHub release creation
- โ Updates Homebrew formula with correct SHA256
- โ Validates everything is ready
See QUICKSTART_RELEASE.md for details.
After creating a release, submit to Homebrew Core:
# Fork and clone homebrew-core
git clone https://github.com/YOUR_USERNAME/homebrew-core.git
cd homebrew-core
# Add formula
git checkout -b devsweep
cp ../dev_sweep/devsweep.rb Formula/devsweep.rb
# Test and submit
brew install --build-from-source Formula/devsweep.rb
brew test devsweep
brew audit --strict --online Formula/devsweep.rb
git add Formula/devsweep.rb
git commit -m "devsweep 1.0.0 (new formula)"
git push origin devsweepSee HOMEBREW_CORE_SUBMISSION.md for complete guide.
Tests: 123 passed, 123 total
Unit: 112 tests (fast validation, <50ms each)
E2E: 11 tests (integration validation)
Smoke: 3 critical tests (CLI, menu, analyze)
Cleanup: 8 tests (module behavior)
Time: ~12.2 seconds (parallel execution)
Coverage: All modules tested, following testing pyramid
See PROGRESS.md for the complete migration roadmap.
- Cross-platform support (macOS, Linux, Windows)
- Hexagonal architecture with clean code principles
- System module for OS caches and logs cleanup
- MCP Server Integration (AI Agent Support)
- Rich terminal UI with Spectre.Console
- JSON output mode for programmatic use
- Native AOT compilation (~75% faster startup)
Contributions are welcome! Please read CONTRIBUTING.md for:
- Code style guidelines
- Testing requirements
- Pull request process
- Development workflow
MIT License - see LICENSE for details.
- Built with bashunit for professional testing
- Follows Clean Code principles and modern bash best practices
- Inspired by the need to reclaim disk space on developer machines
- PROGRESS.md - Migration roadmap and current status
- CONTRIBUTING.md - Contribution guidelines
- QUICKSTART.md - Quick start guide
- QUICKSTART_RELEASE.md - Release workflow guide
- HOMEBREW_CORE_SUBMISSION.md - Homebrew publishing guide
- Repository: https://github.com/Sstark97/dev_sweep
- Issues: https://github.com/Sstark97/dev_sweep/issues
- Releases: https://github.com/Sstark97/dev_sweep/releases
Made with โค๏ธ by developers, for developers
If DevSweep saved you disk space, give it a โญ!
Next steps for Homebrew Core:
- Fork: https://github.com/Homebrew/homebrew-core
- Copy formula: cp devsweep.rb /Formula/
- Commit: git commit -m 'devsweep 1.0.0 (new formula)'
- Create PR to Homebrew/homebrew-core
