lole - clean your Linux box
| cmd/lole | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
lole
Clean your Linux box.
lole is a single-binary CLI that combines disk cleanup, app uninstallation, project artifact purging, system optimization, and live health monitoring — built around Linux primitives (XDG cache dirs, journalctl, apt/dnf/pacman/zypper/apk, /proc, systemctl).
Status
Milestone 1 (MVP) — current. Single binary, all 7 subcommands present and shipping. Three commands are fully functional today:
| Command | Status | Notes |
|---|---|---|
lole clean |
✅ functional | XDG cache, browser/dev/app caches, trash, journald vacuum, package-manager cache |
lole purge |
✅ functional | node_modules, target, __pycache__, .venv, dist, .next, .gradle, … |
lole status |
✅ functional | One-shot CPU/mem/disk/network dashboard via gopsutil |
lole check |
✅ functional | Disk/mem headroom, package manager, network, systemd state |
lole analyze |
⚠️ basic | Sorted directory breakdown; full TUI lands in M2 |
lole optimize |
⚠️ basic | updatedb, fc-cache, ldconfig, drop_caches; conservative |
lole uninstall |
⚠️ stub | Lists user-installed packages, prints removal command. Interactive selector + leftover scrub lands in M2 |
lole installer |
⚠️ basic | Finds .deb / .rpm / .AppImage / archives in ~/Downloads, /tmp |
Install
From source (recommended for now)
git clone https://git.lucataco.dev/Catacolabs/lole
cd lole
make build
sudo make install # /usr/local/bin/lole
One-liner
curl -fsSL https://git.lucataco.dev/Catacolabs/lole/raw/branch/main/install.sh | bash
Requires Go ≥ 1.22.
Usage
lole # Interactive menu
lole clean # Deep cleanup
lole clean --dry-run # Preview without deleting
lole clean --dry-run --debug # Preview with per-file logs
lole purge # Project build-artifact sweep
lole status # System health dashboard
lole check # Diagnostics (alias: lole doctor)
lole analyze [path] # Directory size breakdown
lole optimize # Refresh system caches/indexes
lole uninstall # List installable removals
lole installer # Find leftover installer files
lole completion bash|zsh|fish # Shell tab completion
lole --help
lole --version
Safety
--dry-runis supported on every destructive command. Always preview first.- The cleaner only touches user-owned cache directories under
$HOMEand$XDG_CACHE_HOME. It will not recurse into system paths,/var, or/etc. - Package manager cache cleanup uses each manager's official
clean/autoremoveverbs (apt-get clean,dnf clean all,pacman -Sc, etc.) — no manualrm -rfof system files. lole optimizetriggersdrop_cachesandupdatedb; both are reversible / harmless.
Linux design notes
lole deliberately maps every cleanup concept onto its Linux-native equivalent rather than mimicking macOS or Windows utilities:
| Concept | Linux primitive used |
|---|---|
| User caches | $XDG_CACHE_HOME (~/.cache) |
| App logs | journalctl --vacuum-time=7d + ~/.local/state/*/logs |
| Trash | ~/.local/share/Trash (XDG Trash spec) |
| App config leftovers | ~/.config/<app> after package removal |
| Background services | ~/.config/systemd/user/ units |
| Package install/remove | apt / dnf / pacman / zypper / apk / flatpak / snap |
| File index / search | locate / updatedb / fd |
| Sleep / power management | systemd-inhibit |
Roadmap
- M2: bubbletea-based interactive TUI for
analyze. - M2: interactive package-selection UI for
uninstall+ leftover-file scrub (~/.config/<app>,~/.local/share/<app>, orphaned systemd user units). - M3: Flatpak / Snap deep cleanup (orphaned runtimes, old revisions).
- M3: Nightly self-update (
lole update --nightly). - M3: Operations log at
~/.local/state/lole/operations.logfor audit / undo guidance.
License
MIT — see LICENSE.