lu-cleaner artifacts
Ce contenu n’est pas encore disponible dans votre langue.
Find project artifacts (node_modules, ios/Pods, ios/build, android/build, android/.gradle, .expo, dist…) below the project roots and pick what to delete. Roots default to the config "roots" or auto-detected folders (~/dev, ~/Projects…) plus the AI worktree folders. Roots given as arguments (or with --root) are the only folders scanned. With --yes, cleans without the picker (same rules as 'clean --yes').
Kinds for --target: node_modules, ios-pods (or pods), ios-build, android-build, android-gradle, android-kotlin, android-cxx, expo, next, turbo, js-build, dist… (see the "kind" of items in 'lu-cleaner scan --json'); an unknown kind is an error. Outside an Android or iOS project, android-build is reported as gradle-build, ios-build as xcode-build, android-gradle as gradle-cache and android-kotlin as gradle-kotlin: either name matches both.
lu-cleaner artifacts [roots...] [flags]Examples
Section titled “Examples”lu-cleaner artifactslu-cleaner artifacts ~/local_sources ~/conductor/reposlu-cleaner artifacts -t node_modules -t ios-pods --older-than 30dlu-cleaner artifacts --list --alllu-cleaner artifacts -y -t node_modules --older-than 60d -nOptions
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
-l, --list |
print the list instead of opening the picker | ||
-t, --target |
stringSlice | artifact kinds to look for, e.g. node_modules, ios-pods (pods), android-build (repeatable) |
Global options
Section titled “Global options”| Flag | Type | Default | Description |
|---|---|---|---|
-c, --category |
stringSlice | only these categories (repeatable, comma-separated): worktrees, artifacts, simulators, xcode, android, ai, js, ide, containers, langs, system | |
-n, --dry-run |
show what would be cleaned, delete nothing | ||
--force |
ignore running-app and in-use guards, and the worktree checks (locked, uncommitted changes, commits on no branch, nested worktrees) | ||
--json |
machine-readable JSON output | ||
-k, --kind |
stringSlice | only these item kinds or provider ids (repeatable, comma-separated) | |
--min-size |
string | hide items smaller than this, e.g. 100MB (default: config min_size; 0 for clean --yes) | |
--no-color |
disable colors (also honours NO_COLOR) | ||
--older-than |
string | only items unused for longer than this, e.g. 30d, 2w, 6m | |
--risk |
string | highest risk allowed: safe|moderate|caution (default: moderate for clean --yes, everything otherwise); with --yes, caution also admits items with a warning | |
--root |
stringArray | project root to scan for artifacts (repeatable): replaces the config roots for the artifacts scan only, the other scanners keep them to see what your projects use | |
--scan-mode |
string | eco |
scan resource profile: eco|fast (default: config scan_mode, or eco) |
--smart |
recommended items only: preselected in the picker (nothing is preselected otherwise), the only ones cleaned with --yes | ||
--trash |
move files and folders to ~/.Trash instead of deleting them (space is freed only once the Trash is emptied); worktrees and commands are skipped. --trash=false overrides use_trash | ||
-v, --verbose |
debug logging on stderr | ||
-y, --yes |
clean without the interactive picker |