Clean Linux caches, remove apps, analyze disk usage, and monitor system resources with Preen, an open-source Go CLI and Qt desktop app.

Old node_modules folders, Python virtual environments, and Rust target directories take up space long after a project stops being useful. Package caches and leftover app files add to the mess.

I built Preen to handle Linux cleanup and system monitoring in one application. It can remove caches and apps, inspect disk usage, and show system activity. You can use its Go CLI or a desktop interface built with KDE Kirigami and Qt6.

Preen desktop interface for cleaning Linux caches

Clean Linux caches and old project builds

Preen scans caches from tools including npm, pnpm, uv, pip, Cargo, and Go. Its project cleaner finds disposable folders such as node_modules, .venv, target, and .next in directories you choose.

Start with a preview:

preen clean --dry-run 

To check your projects:

preen purge --add-path ~/code preen purge --dry-run 

Beyond caches, Preen can uninstall apt, snap, Flatpak, and AppImage applications and flag leftover configuration files. It also finds downloaded installers, shows folder sizes, and handles maintenance tasks such as rebuilding font caches.

Monitor system resources

Preen reports CPU load, memory usage, disk and network activity, temperatures, and active processes:

preen status --watch 

It doesn't run as a background daemon.

How Preen handles deletion

A cleanup tool needs clear limits. Preen validates deletion paths and blocks protected system directories and sensitive locations such as ~/.ssh and ~/.gnupg. It also rejects symlinks that lead outside allowed targets and skips working caches for detected active browsers and Electron apps.

User cache cleanup runs with your normal permissions. System operations go through a Polkit helper with an explicit list of allowed actions.

Use --dry-run to review cleanup targets first. You can exclude paths or identifiers such as apt-cache through ~/.config/preen/whitelist and inspect recent operations with:

preen history 

A Go CLI with an optional Qt desktop app

The CLI uses only the Go standard library. Commands support --json output, which the desktop app reads through a small C++ process bridge. Terminal users can install the CLI on its own.

Secure file wiping and process controls such as kill and renice are outside its scope.

Install Preen on Linux

Use the installer:

curl -fsSL https://youxufkhan.github.io/preen/install.sh | sh 

Then run preen clean --dry-run to see what it finds before removing anything.

Preen is open source under GPL-3.0. The GitHub repository has the source, and the documentation covers setup and commands. Report bugs through GitHub issues.