Rusty Sweeper
A fast, interactive disk usage analyzer and cleaner for Linux.
Current Status
Rusty Sweeper is implemented and test-covered across its main command surface:
rusty-sweeperis the interactive product and launches the TUI directly.rusty-sweeper-monitoris a dedicated monitor binary with one-shot checks, daemon mode, PID/log management, and multiple notification backends.
Current limitations:
- Some configuration sections remain informational, but scanner and TUI cleaner settings are active.
- Cleanup and scan engines still exist in the codebase, but they are no longer exposed as standalone CLI subcommands.
Features
- Interactive TUI: Browse disk usage and clean directly from the terminal
- Monitor Service: Background daemon with desktop notifications when disk is full
Installation
From crates.io
From Source
Usage
Interactive TUI
# Launch TUI in the current working directory
# Scan a specific directory instead of the current working directory
# `rusty-sweeper` is the only user-facing mode of the main binary
Monitor Disk Usage
# Check once and exit
# Start as daemon
# Custom thresholds (warn at 70%, critical at 85%)
# Check daemon status
# Stop daemon
Configuration
Configuration file: ~/.config/rusty-sweeper/config.toml
Scanner and TUI cleaner behavior is driven by the corresponding values.
Scanner parallelism, filesystem-boundary behavior, and the persistent metadata cache are active. Cached files are validated by device/inode, size, allocated blocks, and nanosecond modification/change times before their accounting is reused.
[]
= 0 # 0 = auto
= false
= true
= 3600
[]
= ["cargo", "gradle", "maven", "npm", "go", "cmake", "python", "bazel", "dotnet"]
= ["**/.git", "**/vendor"]
= 0
= 10
= 4
[]
= 300 # seconds
= 80
= 90
= []
= "auto"
[]
= "auto"
= false
= "size"
= 1073741824
TUI Keybindings
Scanning and cleanup run in background workers. The UI processes queued scan
results in batches and redraws changed frames at most 60 times per second;
keyboard input and terminal resizing are handled independently. Deleting an
entry updates the in-memory tree without rescanning the root. Press r to
refresh changes made outside the application.
If a deletion fails with a permission error, the TUI offers to retry that path
with sudo. Accepting temporarily opens sudo's terminal password prompt, then
returns to the TUI. Press n or Esc to leave the remaining files in place.
| Key | Action |
|---|---|
j / Down |
Move down |
k / Up |
Move up |
Enter / l / Right |
Expand/enter directory |
h / Left / Backspace |
Collapse/go up |
d / Delete |
Delete selected |
c |
Clean project |
C |
Clean all eligible projects under selected directory |
/ |
Search |
s |
Cycle sort order |
. |
Hide/show hidden files (shown by default) |
r |
Rescan |
? |
Help |
Esc |
Cancel active work, otherwise quit |
q |
Quit |
Cleanup Support
The TUI can identify and clean common local build artifacts for Cargo, npm, Python, CMake, Gradle, Maven, and .NET projects. Docker system resources are also surfaced when available.
Systemd Service
To run the monitor as a systemd user service:
# Install the service
# Enable and start
# Check status
# View logs
License
MIT