npm command to uninstall or prune unused packages in Node.js
Note: Recent npm versions do this automatically when running npm install if package-locks are enabled, so this is not necessary except for removing development packages with the –production flag. Run npm prune to remove modules not listed in package.json. From npm help prune: This command removes “extraneous” packages. If a package name is provided, then … Read more