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.
| npkill | lysosome CLI | |
|---|---|---|
| Install | npx npkill, nothing to install | brew install lysosome-dev/tap/lysosome, cargo install or the install script |
| Platforms | Runs anywhere Node runs, Windows included | macOS and Linux |
| What it finds | node_modules by default; profiles add Python, Rust and game-engine build folders and caches | git-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 git | Yes, it looks at folder names | No: a folder only counts if git check-ignore confirms it |
| Git worktrees | Not covered | Labels each one REMOVABLE, REVIEW, ORPHAN or ACTIVE and removes only REMOVABLE ones with git worktree remove |
| Safety checks | Hides folders some apps need, skips .git, --older-than; leaves the judgment to you | Project must be idle (commits, index, HEAD and reflog older than 30 days); never touches unpushed work; re-checks each item right before acting |
| Default action | Interactive picker; you delete what you select | Read-only scan; clean is a dry run until you add --yes; dependencies need an explicit --tier |
| Where files go | Deleted (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 API | Versioned --json output and --progress json events |
| Desktop app | No | lysosome for Mac (14-day free trial): menu bar gauge, one-click cleanup with Undo |
Where npkill is the better pick
- Nothing to install.
npx npkillruns in any folder where you have Node. - Windows. lysosome runs on macOS and Linux only.
- Projects that aren't git repositories. lysosome only counts folders that git confirms are ignored, so a folder of unversioned experiments is invisible to it. npkill goes by folder name.
- Fast hands-on browsing. Its picker is built for scrolling a long list and deleting as you go.
Where lysosome is the better pick
- Agent worktrees. Claude Code, Cursor and parallel agents create a git worktree per task, and each one gets its own
node_modulesortarget/. lysosome finds the dormant ones and tells you which are safe to drop: clean, not locked, and every commit merged or pushed. The worktree guide shows the checks. - The rest of the disk. One scan also covers npm, pnpm, Cargo and pip caches, Ollama and Hugging Face models, Docker and Xcode DerivedData.
- You'd rather not judge each folder. Every item gets a safety tier, anything uncertain is labelled REVIEW and never removed, and files go to the Trash so a mistake is recoverable.
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.