lysosome

Comparison · npkill

lysosome vs npkill: which node_modules cleaner fits

Updated · Scott Havird

short answer

npkill is the quickest way to browse node_modules folders and delete the ones you pick, on any OS, with nothing to install. lysosome is for when the disk is going to more than node_modules: it also finds dormant git worktrees, package caches, local AI models, Docker and Xcode data, checks git before it touches anything, and moves files to the Trash. If your projects aren't in git, or you're on Windows, use npkill.

Side by side

Both are free and MIT-licensed. This compares npkill as its README describes it on the date above.

npkilllysosome CLI
Installnpx npkill, nothing to installbrew install lysosome-dev/tap/lysosome, cargo install or the install script
PlatformsRuns anywhere Node runs, Windows includedmacOS and Linux
What it findsnode_modules by default; profiles add Python, Rust and game-engine build folders and cachesgit-ignored build and dependency folders (node_modules, target, .venv, .next, Pods and more), plus dormant git worktrees, package caches, local AI models, Docker and Xcode
Projects outside gitYes, it looks at folder namesNo: a folder only counts if git check-ignore confirms it
Git worktreesNot coveredLabels each one REMOVABLE, REVIEW, ORPHAN or ACTIVE and removes only REMOVABLE ones with git worktree remove
Safety checksHides folders some apps need, skips .git, --older-than; leaves the judgment to youProject must be idle (commits, index, HEAD and reflog older than 30 days); never touches unpushed work; re-checks each item right before acting
Default actionInteractive picker; you delete what you selectRead-only scan; clean is a dry run until you add --yes; dependencies need an explicit --tier
Where files goDeleted (the README doesn't describe a Trash option)The Trash by default (--permanent to delete); every action is logged
Scripting--json, --json-stream, --dry-run, a Node APIVersioned --json output and --progress json events
Desktop appNolysosome for Mac (14-day free trial): menu bar gauge, one-click cleanup with Undo

Where npkill is the better pick

Where lysosome is the better pick

Try it

lysosome scan ~/code                    # read-only: what's taking space, by safety tier
lysosome clean ~/code --artifacts       # dry run: build output only
lysosome clean ~/code --artifacts --tier regenerable_expensive --yes
                                        # also node_modules and .venv, to the Trash

More on doing it by hand or with lysosome: find and delete old node_modules, target and .venv folders safely.