An interactive terminal app (built with Ink + React) to find and permanently delete node_modules folders across your projects.
OB stands for Office Boy. If you've ever worked in an Indonesian office, you know the OB: the true MVP who quietly keeps the whole place clean and running while everyone else is busy "being productive". Your disk deserves one too.
This particular OB has exactly one job description: sweep away your dusty, gigantic node_modules folders. He doesn't make coffee. He doesn't do the dishes. He just shows up when you call him (ob), points at the mess, asks "boleh dibuang, Pak/Bu?" — and once you say yes, it's gone. Permanently. No drama, no trash bin, no second thoughts.
If you work on a lot of JavaScript/TypeScript projects, every single one drags along its own node_modules — often hundreds of MB each. They pile up silently until one day your disk is full and you have no idea where the storage went. I built this because I got fed up hunting them down and deleting them one by one.
ob scans a directory, shows you every project that has a node_modules folder (with its size), lets you pick which ones to nuke, asks for confirmation, and deletes them permanently. Reclaim gigabytes in seconds — you can always npm install again when you actually come back to a project.
- Node.js ≥ 18
- Works on macOS, Linux, and Windows
Clone this repo and install dependencies first:
git clone <this-repo-url>
cd node-cleaner
npm install # also builds dist/cli.js automatically (prepare script)No manual build step needed — npm install runs the build for you via the prepare script. Then register the global ob command using one of these two options:
npm install -g .This copies the package into npm's global folder. After this you can safely delete the cloned repo — ob keeps working.
npm linkThis creates a symlink pointing to the repo folder. Do not delete the repo — the ob command would break. The upside: edit the source, run npm run build, and the global ob picks up your changes immediately.
Same command for both install options:
npm uninstall -g node-officeboyThis removes the global ob command (and the symlink, if you used npm link). The Office Boy leaves quietly — no severance package required.
ob # scan from the current directory
ob ~/code # scan from a specific directoryIt scans recursively (nested projects and monorepos included), skips hidden folders, and never descends into node_modules itself. Sizes are calculated in the background while you browse.
| Key | Action |
|---|---|
↑ / ↓ (or j / k) |
Move cursor |
Space |
Select / deselect |
a |
Select all / deselect all |
Enter |
Delete selected (asks for confirmation first) |
y / n |
Answer the confirmation prompt |
q / Esc |
Quit |
⚠️ Deletion is permanent — folders are removed directly, not moved to trash. That's the point, but you've been warned.
npm install
npm run build # esbuild: src/*.jsx -> dist/cli.js
npm run dev # build + runSince the package is linked with npm link, just run npm run build after editing the source and the global ob command picks up the changes immediately.