Molten metal skimmed. Zero speculative deletion.

Conservative disk cleaner for Fedora and WSL

dross is the scum that floats to the top of molten metal in a blast furnace. It removes only what it can prove is worthless and regenerable — and tells you what it is about to do before touching a single byte.

$ cargo install --git https://github.com/zhugez/dross
Run Interactive Dry-Run
100%
Read-only by default (no silent deletions)
du Proof
Every byte measured before and after
0 Deps
Zero crates outside Rust coreutils
Protected
Docker volumes are never automatically pruned
fedora-wsl: ~/repos/dross
FILTER:
✓ Safe tier ready for clean
Metallurgical Tiers

Categorized by the cost of replacement

Not all caches are created equal. A Go compile cache is worthless disk weight; a 15GB HuggingFace model or Docker volume represents bandwidth and human hours.

safe dross clean safe

Pure Ephemeral Scum

Trivially regenerable caches with zero download penalty. Rebuilds transparently on next build or install command.

  • npm cache~/.npm/_cacache
  • npx binary cache~/.npm/_npx
  • dnf metadata~/.cache/libdnf5
  • Go build artifacts~/.cache/go-build
  • dnf package cachednf clean all
cost dross clean cost

Expensive to Re-fetch

Regenerable, but consumes noticeable internet bandwidth or compilation time when rebuilt. Skim only when disk is tight.

  • HuggingFace models~/.cache/huggingface
  • pip3 wheels cachepip3 cache purge
  • cargo registry git/index~/.cargo/registry
  • pnpm hardlink storepnpm store prune
  • Playwright/Puppeteer~/.cache/ms-playwright
manual explicit review only

Human Judgement Demanded

Operations that touch recoverable state, logs, or orphan packages. Never automated without conscious operator intent.

  • Desktop Trash~/.local/share/Trash
  • systemd journalctljournalctl --vacuum-size=200M
  • dnf old kernelsdnf remove --oldinstallonly
  • docker images & builderdocker image prune -af
  • Docker volumesNEVER pruned automatically
The 5 Ironclad Guarantees

Why dross will never destroy your workstation

A disk cleaner that gets cute with wildcards is a time-bomb. dross is built on defensive systems invariants.

GUARANTEE 01

Read-Only by Default

Running dross without arguments performs a dry-run scan. Even dross plan <tier> only lists planned deletions. Deletion requires the explicit verb clean.

GUARANTEE 02

Strict Inode & Symlink Guard

Every path is checked before deletion. Rejects paths outside $HOME and /tmp, paths shallower than 3 components (e.g. ~/.cache is rejected), and any path with a symlink at or above it.

GUARANTEE 03

Empirical `du` Proof

No assumed numbers. Target sizes are measured with real du before and after. If a directory still exists after removal, dross flags a hard failure and exits with status 1.

GUARANTEE 04

Docker Volumes Are Sacred

Volumes routinely host real production test databases. dross reports total reclaimable space and dangling counts, but refuses to prune docker volumes automatically.

GUARANTEE 05

Full Audit Log

Every execution is appended to $XDG_STATE_HOME/dross.log with the exact resolved timestamp, path, command, and measured freed space. Zero mystery.

GUARANTEE 06

Zero Config Drift

No sprawling JSON or YAML files that silently rot. The rules table is compiled directly into the binary in src/rules.rs. What was compiled is exactly what runs.

WSL2 Specific Insight

Why deleting files doesn't shrink your Windows drive

WSL stores Linux partitions inside dynamic ext4.vhdx files on NTFS. When you run rm -rf inside Linux, the ext4 filesystem frees inode blocks, but the Windows Virtual Hard Disk (.vhdx) never shrinks on its own.

After cleaning with dross, run this one-line command in Windows PowerShell to compact the VHDX:

PS> wsl --manage Fedora --set-sparse true
HOST WINDOWS NVME RECLAIM:
~16.0 GB returned to Windows C:\
Zero downtime · Instant sparse hole punching
Copied to clipboard