Just some NPM commands I had to look up.
What NPM packages are installed?
- List your global npm packages:
npm list -g
- dropping the
-g
flag will list packages in the current directory
- dropping the
Removing NPM packages
-
Remove a package:
npm r <name>
- aliases for r: remove, rm, un, unlink, uninstall (see npm uninstall docs)
Remove extraneous packages and packages that are not listed on the parent package's dependencies list:
npm prune <name>
(see npm prune docs)Uninstall all npm packages (stack overflow):
rm -rf node_modules && npm cache clean && npm install
Top comments (0)