Warning: This project is no longer actively maintained. I am migrating away from Linux Mint, and this app was built specifically for that environment. No further updates or bug fixes are planned. Feel free to fork and continue development.
MintSweep is a GTK3 system cleaner for Debian-based Linux distributions. It scans eight categories of reclaimable disk space, lets you preview what will be removed, and cleans selected categories with a single click. Root-level operations are batched into a single pkexec prompt so you only authenticate once.
- Single-window dashboard with disk usage bar, stats row, category cards, selection summary, clean button, and cleaning history
- 8 cleaning categories, each with independent scan, preview, and clean:
Category What it cleans Privilege APT Package Cache .debfiles in/var/cache/apt/archivesRoot Orphaned Packages apt autoremovecandidatesRoot Old Kernels Unused kernel packages (running + latest always protected) Root Thumbnail Cache ~/.cache/thumbnailsUser Browser Caches Firefox and Chrome/Chromium cache directories User System Logs / Journal Rotated logs ( *.gz,*.1) and journald vacuumRoot Trash ~/.local/share/TrashUser Temp Files Old files in /tmpand/var/tmp(age-based)Mixed - Parallel scanning via
ThreadPoolExecutor(4 workers) -- all categories scan concurrently - Batch privilege escalation -- all root commands are written to a single temporary script and executed through one
pkexecprompt - Confirmation dialog before every clean operation, listing categories and sizes
- Cleaning history stored in SQLite, displayed at the bottom of the dashboard
- Auto-scan on launch so the dashboard is populated immediately
- Catppuccin Mocha dark theme applied via targeted CSS classes (
.ms-*prefix) - Debug mode (
--debug) for verbose logging
MintSweep tries to be conservative and transparent:
- Running kernel protection -- the currently booted kernel is never marked for removal
- Latest kernel protection -- the newest installed kernel is always preserved, even if it is not the running one
- Temp file age filter -- only files older than a configurable threshold (default: 7 days) are flagged
- Journal vacuum, not delete -- journald is vacuumed by time (default: 14 days), not wiped
- Dry-run detection -- orphaned packages are identified via
apt-get --dry-run autoremove, not by heuristic - Per-item preview -- scan results show item counts and sizes before any cleaning happens
- Confirmation dialog -- every clean operation requires explicit user confirmation
- Root command batching -- root operations are collected into a single script and executed in one
pkexeccall; cancelling authentication aborts all root operations cleanly - User-owned vs root-owned separation -- temp file cleanup separates user-owned files (deleted directly) from root-owned files (deleted via pkexec)
- Graceful partial failure -- if root operations fail or are cancelled, user-level cleaning results are still recorded
sudo apt install python3 python3-gi gir1.2-gtk-3.0 gir1.2-glib-2.0 policykit-1| Tool | Used by | Notes |
|---|---|---|
apt-get |
APT cache, orphaned packages, old kernels | Standard on Debian/Ubuntu/Mint |
dpkg / dpkg-query |
Kernel size estimation, orphan detection | Standard on Debian/Ubuntu/Mint |
journalctl |
System logs service | Part of systemd |
pkexec |
Privilege escalation for root operations | Part of PolicyKit |
MintSweep uses only the Python standard library plus PyGObject (GI bindings). There are no third-party pip dependencies.
git clone https://github.com/your-username/mintsweep.git
cd mintsweep
chmod +x install.sh
./install.shThis will:
- Copy the application to
/opt/mintsweep/ - Create a launcher at
/usr/local/bin/mintsweep - Install a
.desktopfile at/usr/share/applications/mintsweep.desktop
# Copy source
sudo mkdir -p /opt/mintsweep
sudo cp -r *.py backend core services ui /opt/mintsweep/
sudo find /opt/mintsweep -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
# Create launcher
sudo tee /usr/local/bin/mintsweep > /dev/null << 'EOF'
#!/usr/bin/env bash
export PYTHONPATH="/opt:${PYTHONPATH:-}"
cd /opt
exec python3 -m mintsweep "$@"
EOF
sudo chmod +x /usr/local/bin/mintsweepcd /path/to/mintsweep/..
python3 -m mintsweep
python3 -m mintsweep --debug # verbose loggingmintsweep # normal mode
mintsweep --debug # enable debug logging to stderr- Scan -- the app automatically scans all 8 categories on launch. Click Scan in the header to re-scan at any time.
- Review -- each category card shows the number of items found and total reclaimable size. Categories with nothing to clean are automatically unchecked and disabled.
- Select -- check or uncheck categories. The selection summary updates in real time showing the total size of selected categories.
- Clean -- click Clean Selected. A confirmation dialog lists every category and its size. If any selected category requires root, the button label indicates "(requires password)".
- Authenticate -- if root operations are included, a single
pkexecpassword prompt appears. Cancelling skips only the root operations; user-level cleaning still completes. - Done -- a summary dialog shows total space freed. The dashboard re-scans automatically and the cleaning history updates.
Configuration is stored as JSON at:
~/.config/mintsweep/config.json
{
"categories": {
"apt_cache": true,
"orphaned_packages": true,
"old_kernels": true,
"thumbnails": true,
"browser_caches": true,
"system_logs": true,
"trash": true,
"temp_files": true
},
"journal_vacuum_days": 14,
"temp_max_age_days": 7,
"kernels_to_keep": 2
}| Key | Type | Default | Description |
|---|---|---|---|
categories.* |
boolean | true |
Enable/disable individual cleaning categories |
journal_vacuum_days |
integer | 14 |
Days to retain when vacuuming journald |
temp_max_age_days |
integer | 7 |
Only flag temp files older than this many days |
kernels_to_keep |
integer | 2 |
Number of kernel versions to retain |
| File | Path |
|---|---|
| Config | ~/.config/mintsweep/config.json |
| History DB | ~/.local/share/mintsweep/mintsweep.db |
mintsweep/
├── __init__.py # Version and app ID
├── __main__.py # CLI entry point (argparse, logging setup)
├── app.py # GtkApplication — wires config, DB, scanner, cleaner, UI
├── install.sh # Installer script
│
├── backend/
│ ├── config.py # ConfigManager — JSON config with defaults
│ └── database.py # Database — SQLite cleaning history (clean_history table)
│
├── core/
│ ├── scanner.py # Scanner — ThreadPoolExecutor parallel scan, GObject signals
│ ├── cleaner.py # Cleaner — threaded clean, user/root separation, DB recording
│ └── privilege.py # run_root_commands() — batch pkexec via temp script
│
├── services/
│ ├── __init__.py # ScanResult dataclass
│ ├── apt_service.py # APT package cache (/var/cache/apt/archives)
│ ├── orphan_service.py # Orphaned packages (apt autoremove candidates)
│ ├── kernel_service.py # Old kernels (protects running + latest)
│ ├── cache_service.py # Thumbnail cache (~/.cache/thumbnails)
│ ├── browser_service.py # Firefox + Chrome/Chromium caches
│ ├── log_service.py # System logs + journald vacuum
│ ├── trash_service.py # Trash (~/.local/share/Trash)
│ └── temp_service.py # Temp files (/tmp, /var/tmp, age-based)
│
└── ui/
├── theme.py # Catppuccin Mocha CSS (apply_theme())
└── main_window.py # MainWindow — dashboard, cards, progress, history
- Service pattern -- each cleaning category is a standalone module exposing
scan(),clean(items), androot_commands(items). This makes it easy to add new categories. - User/root separation -- the Cleaner first runs all user-level operations, then batches all root commands into a single pkexec invocation.
- GObject signals -- Scanner and Cleaner emit progress and completion signals; the UI connects to these and updates via
GLib.idle_addfor thread safety. - No pip dependencies -- the entire app runs on Python standard library plus system-installed PyGObject.
sudo rm -rf /opt/mintsweep
sudo rm -f /usr/local/bin/mintsweep
sudo rm -f /usr/share/applications/mintsweep.desktop
# Optional: remove user data
rm -rf ~/.config/mintsweep
rm -rf ~/.local/share/mintsweepMIT License. See LICENSE for details.