A fast, terminal-based tool for managing your Homebrew packages by tracking their usage and helping you identify packages that can be safely removed. Built with Rust and ratatui for a responsive TUI experience.
BrewSweep scans your installed Homebrew packages (both formulas and casks) and displays them sorted by last access time. This makes it easy to identify:
- Never-used packages - Installed but never accessed
- Rarely-used packages - Haven't been used in months or years
- Recently-used packages - Actively used packages to keep
The tool provides a clean, interactive interface for viewing package details and safely removing unused packages to free up disk space. Sweep away the clutter and keep only what you actually use!
Watch BrewSweep in action - scan your Homebrew packages, identify unused ones, and safely remove them:
BrewSweep automatically sorts packages by last access time, making cleanup decisions easy
- Real-time scanning of all Homebrew formulas and casks
- Last access time tracking using filesystem metadata
- Automatic sorting by usage (least recently used first)
- Detailed package information including installation paths
- Interactive table view with keyboard navigation
- Package details screen showing comprehensive information
- Safe deletion workflow with confirmation dialogs
- Real-time uninstall output showing brew command progress
- Responsive interface built with ratatui
- Color-coded display with multiple themes
- Keyboard shortcuts for efficient navigation
- Progress indicators for all operations
- Fast scanning using parallel processing
- Non-blocking UI - responsive during operations
- Memory efficient handling of large package lists
- Background operations for deletions
- Rust (1.70 or later) - Install Rust
- Homebrew installed and in PATH - Install Homebrew
- macOS (primary platform)
cargo install brewsweep
# Clone the repository
git clone https://github.com/DrudgeRajen/brewsweep.git
cd brewsweep
# Build and install
cargo build --release
# Run the application
./target/release/brewsweep
# Install directly from git
cargo install --git https://github.com/DrudgeRajen/brewsweep.git
-
Start the application
brewsweep
-
Scan packages
- Press
Space
to start scanning your Homebrew installation - Watch real-time progress as packages are discovered
- Press
-
Browse packages
- Use
β
/β
arrow keys to navigate the package list - Packages are automatically sorted with least-used first
- Use
-
View details
- Press
Enter
on any package to see detailed information - View last access time, type, and installation path
- Press
-
Delete packages
- Press
d
to delete a selected package - Confirm with
y
or cancel withn
- Watch real-time output from the
brew uninstall
command
- Press
Key | Action |
---|---|
Space |
Start package scan |
β /β |
Navigate up/down |
β /β |
Navigate left/right |
Enter |
View package details |
d |
Delete selected package |
r |
Refresh (re-scan packages) |
Shift + β |
Next color theme |
Shift + β |
Previous color theme |
Esc |
Quit application |
Key | Action |
---|---|
Enter /Space |
Back to table |
d |
Delete this package |
Esc |
Quit application |
Key | Action |
---|---|
y /Enter |
Confirm deletion |
n /Space |
Cancel deletion |
Esc |
Quit application |
The tool displays packages with the following information:
- Package Name - The Homebrew package identifier
- Type - Formula (command-line tool) or Cask (GUI application)
- Last Accessed - Human-readable time since last use:
- "Never accessed" - Package never used
- "2 hours ago" - Recently used
- "3 months ago" - Moderately old
- "1 year ago" - Very old, candidate for removal
- Path - Installation location on your system
Packages are automatically sorted by usage to prioritize cleanup candidates:
-
Never accessed packages (top of list)
- Easiest to identify for removal
- Safe to delete if you don't recognize them
-
Oldest accessed packages
- Haven't been used in months/years
- Good candidates for cleanup
-
Recently accessed packages (bottom of list)
- Actively used, probably should keep
- Latest access times
git clone https://github.com/DrudgeRajen/brewsweep.git
cd brewsweep
cargo build --release
This project uses the following Rust crates:
ratatui
- Terminal user interfacecrossterm
- Cross-platform terminal handlingcolor-eyre
- Error handling and reportingunicode-width
- Text width calculation
Contributions are welcome! Please feel free to submit issues and pull requests.
git clone https://github.com/DrudgeRajen/brewsweep.git
cd brewsweep
cargo build
cargo run
cargo test
This project uses standard Rust formatting:
cargo fmt
cargo clippy
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ratatui for the excellent terminal UI framework
- Uses crossterm for cross-platform terminal support
- Error handling powered by color-eyre
- Inspired by the need to manage ever-growing Homebrew installations efficiently
If you find this tool useful, please consider:
- β Starring the repository
- π Reporting bugs and issues
- π‘ Suggesting new features
- π€ Contributing code improvements
Happy Homebrew sweeping! π§Ήβ¨
Keep your system lean and your packages meaningful.