Npm uninstall commandThe default package manager for js or Node.js is NPM (Node Package Manager). It installs together with the installation of Node.js and controls all the packages. Any package we install into our project using the npm client on the command prompt is installed in the node modules folder, and its version information is replicated in the package.json file. Working with packages is made possible through the Node Package Manager (NPM), which offers various commands. We can use the npm uninstall command to remove a package from the computer. But we should not uninstall a global package and a dev dependent like an ordinary package or dependency. Now we describe how to remove an ordinary package, a global package, as well as a developer dependency. How to remove the npm ordinary package
The following image shows we uninstall the command in the command prompt. The synonyms for the npm uninstall command are npm un, npm rm, npm remove, and npm unlink. Using the npm uninstalls command, the package and its dependencies are fully removed from the active project. The package.json file is also updated.
Use npm Uninstall to Remove a Development Dependency.A package that is only used for development is a dev dependency. We must include the following commands as a dev argument to the npm uninstall command. It is used before specifying the package name to remove a dev dependency. The following commands are the basic syntaxes for achieving uninstallation of dependency. OR The location (folder) where the dependent must be used to perform the command.
The following command uses to get rid of nodemon. We can see that the package no longer contains Nodemon in the json file. Similarly, other dependencies are uninstalled and removed from other commands in the command prompt. The following commands help to remove the required dependencies.
ConclusionFor the Node Js/javascript platform, the command line helps to uninstall npm step by step for operations. It helps to uninstall npm packages and other related dependencies in a single command line using a command prompt. The npm uninstall commands for the javascript functionality in all web-related applications.
Next TopicNpm Update Library and Npm List
|