Language: EN

eliminar-carpeta-node-modules-npkill

Clean the node_modules folder of NPM with NPkill

The node_modules folder is famous for the space it can occupy. As projects grow and evolve, the accumulation of dependencies can lead to excessive clutter, and become a monster that consumes megabytes upon megabytes.

This is where npkill comes into play, an open-source script designed to quickly and safely remove node_modules folders. This tool allows us to select specific projects and free up valuable disk space, cannibalized by NPM.

What is npkill?

npkill is a tool that simplifies the process of cleaning NPM projects by offering an interactive way to select which node_modules folders to delete. npkill provides a simple interface and advanced options for personalized dependency management.

npm-npkill

Installing NPkill

Installing npkill is straightforward and can be done via NPM:

npm install -g npkill

Using NPKill

Once installed, simply open a terminal and navigate to the root of the folder that contains the projects you want to clean.

npkill

This will start the project scanning process and present us with options to select the node_modules folders to be deleted. We just have to follow the instructions and choose the files we want.