Removing dependencies
You can remove a dependency using the uninstall command:
# npm uninstall <package-name> npm uninstall express
This command will remove the dependency from the package.json and package-lock.json files and the node_modules folder.
Global dependencies are removed with the -g or --global argument:
# npm uninstall --global <package-name> # npm uninstall -g <package-name> # Remove yeoman globally npm uninstall --global yo
In the next section we will explore how the package-lock.json file can help us to manage our dependencies.