Thanks to visit codestin.com
Credit goes to lib.rs

#find-duplicates #cache #trash #linux #blake3 #cleaner

bin+lib cleanux

Linux cleaner CLI (CleanMyMac-like): scan & safely trash cache, find duplicates, list large files

1 unstable release

Uses new Rust 2024

new 0.1.0 Jan 15, 2026

#858 in Filesystem

MIT/Apache

17KB
328 lines

cleanux

Coverage

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).

Dependencies

~10–41MB
~576K SLoC