remove-node-modules
is an NPX tool that removes the node_modules
folder from multiple projects.
You can use this tool without installing it globally by using NPX:
npx remove-node-modules <path-to-root-directory>
Alternatively, if you want to install it globally:
npm install -g remove-node-modules
Run the tool using the NPX command:
npx remove-node-modules /path/to/root/folder
This will remove the node_modules
folder from every project inside the specified directory.
If no directory is specified, the tool will default to the current working directory:
npx remove-node-modules
To remove node_modules
from all projects inside a workspace
folder:
npx remove-node-modules ~/workspace
- Recursively deletes
node_modules
folders from multiple project directories. - Handles paths across different operating systems using
rimraf
.