cleanup
fialr cleanup <target> [options]Cleanup operations. Runs dedup and validate in sequence. Dry-run by default. To apply changes, pass both --execute and --reviewed.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
target | Directory to clean up (required) |
Options
Section titled “Options”| Option | Description |
|---|---|
--execute | Apply changes (not just dry-run) |
--reviewed | Confirm that execution is approved (required with --execute) |
--no-dedup | Skip the deduplication phase |
--no-validate | Skip the validation phase |
--output-dir PATH | Output directory for cleanup artifacts |
What it does
Section titled “What it does”cleanup runs two phases in sequence:
- Dedup — find exact and near-duplicate files, stage non-canonical copies
- Validate — verify file integrity against the database
Dry-run (default)
Section titled “Dry-run (default)”Without --execute, cleanup reports what duplicates were found and what integrity issues exist. No files are modified.
Execution
Section titled “Execution”With --execute --reviewed, dedup stages non-canonical duplicates to _dupes/ and validate reports integrity mismatches.
Skipping phases
Section titled “Skipping phases”Use --no-dedup to skip deduplication (validate only). Use --no-validate to skip validation (dedup only).
Output
Section titled “Output”Dry-run:
cleanup ~/Documents
DEDUP 847 files (1.2s) VALIDATE 847 files (2.1s)──────────────────────────────────────────────────────── files 847 dupes 14 (3 groups) verified 833 mismatch 0 total 3.3sExamples
Section titled “Examples”# Dry-run cleanupfialr cleanup ~/Documents
# Execute cleanupfialr cleanup ~/Documents --execute --reviewed
# Dedup only (skip validation)fialr cleanup ~/Documents --no-validate
# Validate only (skip dedup)fialr cleanup ~/Documents --no-dedup