cleanux is both an executable binary that can be run, and a library that can be used in Rust programs.
Installing the command-line executable
Assuming you have Rust/Cargo installed , run this command in a terminal:
cargo install cleanux
It will make the cleanux command available in your PATH if you've allowed the PATH to be modified when installing Rust . cargo uninstall cleanux uninstalls.
Adding cleanux library as a dependency
Run this command in a terminal, in your project's directory:
cargo add cleanux
To add it manually, edit your project's Cargo.toml file and add to the [dependencies] section:
cleanux = "0.1.0"
The cleanux library will be automatically available globally.
Read the cleanux library documentation .
Back to the crate overview .
Readme
cleanux
Fast, safe, and scriptable Linux cleanup in one Rust CLI.
Think "CleanMyMac for Linux" without the bloat:
Scan and safely clean user cache (Trash by default)
Find duplicate files (size -> BLAKE3 hash)
List the largest files fast
Requirements
Rust 1.85+ (Rust 2024 edition)
Build
cargo build -- release
Usage
Scan cache
./target/release/cleanux scan cache
Clean cache (safe: move to Trash)
Dry-run is the default. Add --apply to actually move items to Trash.
./target/release/cleanux clean cache # dry-run
./target/release/cleanux --apply clean cache # apply
Find duplicates
./target/release/cleanux dups ~ /Downloads
./target/release/cleanux dups ~ /Downloads -- trash
Largest files
./target/release/cleanux large ~ -- top 30
Notes / Safety
cleanux clean cache targets the XDG cache directory (usually ~/.cache ).
Deletions are implemented as move to Trash (FreeDesktop Trash on Linux).
You can extend cleaners by adding modules under src/cleaners/ .
Why cleanux?
Safe by default : dry-run first, Trash instead of delete.
Fast scans : parallel walking with predictable output.
Simple workflow : one binary, clear subcommands, no daemon.
Roadmap ideas
Configurable excludes via config.toml .
More cleaners (logs, old downloads, browser caches).