npm remove node_modules code example
Example 1: how to remove node_modules from git
# Do the below steps -
# Make .gitignore file.
# Run below commands in your terminal
git rm -r --cached node_modules
git commit -am "node_modules be gone!"
git push origin master
Example 2: remove node modules command
rm -rf node_modules/
npm install
Example 3: How to uninstall npm modules in node js?
The command is simply npm uninstall <name>
npm uninstall <name>
npm uninstall <name> --save
npm uninstall <name> --save-dev
npm uninstall -g <name> --save
Example 4: delete node_modules
rm -rf node_modules/
yarn install
Example 5: delete node modules
npkill
Example 6: delete node module
npm uninstall node_module_name