Skip to content

scrub

Usage
scrub [-a] [-d] [-h]

Recursively finds and removes OS metadata, editor artifacts, compiler garbage, and dev caches from the current directory using fd. Routes deletions through the custom rm function, trashy, trash-cli, or system rm -rf in that priority order. Aggressive mode adds node_modules, logs, IDE directories, and AI tool artifacts.

Arguments:

-a, --aggressive Also purge node_modules, *.log, .cache, .idea, AI artifacts
-d, --dry-run Show targets without deleting
-h, --help Show usage help

Returns:

0 Sweep completed (or dry run shown)
1 fd not found, or unknown argument provided
Examples
scrub
scrub -a
scrub -d