Npkill

NPKILL

📦 node_modules under your control
npx npkill
Npkill gif demo

What is npkill?

Npkill is a CLI tool that allows you to list all the heavy node_modules that you have scattered around your computer and allows you to delete those you don't need in a very simple and elegant way.

You might be surprised how much space node_modules from old projects are silly taking up.

Super Fast 🚀

Npkill looks for node_modules or any other directory at low level and in a distributed way, so it will make almost full use of disk and CPU capacities.

Super easy 😎

A, B and C. No weird stories. Intuitive to use.

How to use

  • Step 1: Run npx npkill on your terminal.
  • Step 2: Npkill will start scanning the working directory from where you have executed the command (see below for options to change this). The results will start to be displayed.
  • Step 3: Navigate through the results with ▲ or ▼ and press Del to delete.

Some applications installed on the system (like spotify or discord) need their node_modules directory to work and deleting them may break them. Npkill will highlight them by displaying a ⚠️ to be careful.

All controls

  • For move up: ▲ or k.
  • For move down: ▼ or j.
  • For scroll one page up: PgUp, l or Ctrl+u.
  • For scroll one page down: PgDown, h or Ctrl+d.
  • For go to the first or last result: HOME/END.
  • For open result in file explorer or last: o.

Options

Arg Description Default
-c, --bg-color Change row highlight color. Available: blue, cyan, magenta, white, red and yellow blue
-d, --directory Set the directory from which to begin searching .
-D, --delete-all Automatically delete all node_modules folders that are found. false
-e, --show-errors Show error messages if any false
-E, --exclude Exclude directories from search (directory name list must be inside double quotes "", each directory separated by ',' ) Example: "ignore1, ignore2" --
-f, --full Start searching from the home of the user (example: "/home/user" in linux) false
-gb Show folders size in Gigabytes instead of Megabytes false
-h, --help, ? Show help false
-nu, --no-check-update Dont check for updates on startup false
-s, --sort Sort results by: size, path or last-mod none
-t, --target Specify the name of the directories you want to search node_modules
-x, --exclude-hidden-directories Exclude hidden directories ("dot" directories) from search. false
--dry-run It does not delete anything (will simulate it with a random delay). false
-v, --version Show npkill version false
In future versions some commands may change

The team

View all contributors

Backers

Many thanks to all those who have also supported the project financially!

Carlos Caballero avatar
Carlos Caballero
68$
incognito avatar
incognito
60$
Fantastic project. Definitely worth contributing
incognito avatar
incognito
20$
Pero qué pedazo de programadores, por Dios sant...
Joel Di Trapani avatar
Joel Di Trapani
20$
Guest avatar
Guest
20$
Valentin Funk avatar
Valentin Funk
10$
Salesforce avatar
Salesforce
10$
Chris Scott avatar
Chris Scott
10$
Hung Vo avatar
Hung Vo
10$
Don Morris avatar
Don Morris
10$
incognito avatar
incognito
5$
Happy holidays and thanks for the disk space! 💖
Eduard-Cristi avatar
Eduard-Cristi
5$
Guest avatar
Guest
5$
Livre avatar
Livre
5$
CloudAnswers avatar
CloudAnswers
5$
Vasyl avatar
Vasyl
5$
Incognito avatar
Incognito
4$
Elwyn avatar
Elwyn
3$
Thinkmill avatar
Thinkmill
3$
Contribute!