Clean up node_modules, Python venvs, NVM versions, Xcode, and other dev artifacts. Interactive tables, Trash-safe deletes, optional scheduled check alerts.
also: npm install -g @codelynther/dclean | npx dclean-cli --init
Cleanup for dev machines
Scans paths you configure. You pick what to remove.
Finds `node_modules` in nested projects, monorepos, and workspaces.
Select by age (e.g. older than 3 months) or pick individual folders.
Confirmed items go to Trash so you can recover mistakes.
Python venvs, Rust target, Gradle, Flutter, Xcode, CocoaPods, NVM.
Sorted by size with last-modified dates in the terminal.
Run via cron. Get an OS notification with folder paths when bloat crosses thresholds. Never deletes.
โ ~ dclean --nvm
๐งน D Clean v0.2.3
Scanning global locations...
โ Scan complete!
๐ NVM versions (6)
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ Version โ Size โ Last Modified โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ v18.18.2 โ 380.2 MB โ 1 year โ
โ v20.19.2 โ 361.95 MB โ 6 months โ
โ v22.18.0 โ 167.61 MB โ 1 month โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
Subtotal: 1.31 GB
? Check what to delete (space=check/uncheck, enter=confirm)
โฏ โฏ โญ Skip: do not delete anything (exit)
โฏ ๐ NVM versions older than 3 months (2, 742 MB)
โฏ ๐ NVM versions older than 6 months (1, 380 MB)
โฏ โณ ๐ Select specific NVM versions...
_
dclean --init
First run setup. Choose folders to scan and save to ~/.dclean/config.json. Required before cron check.
dclean --node-modules
Scan node_modules across your configured paths.
dclean --history
View past cleanups and total space reclaimed.
dclean --check --silent
Cron-friendly. Notifies when one category exceeds 5 GB or total reclaimable space exceeds 10 GB. Never deletes.
Run dclean --init first. Then add a cron line with absolute paths from which node and which dclean:
0 18 * * 0 /path/to/node /path/to/dclean --check --silent
See all options with --help