Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to uninstall npm package

In this article, you will learn how to Uninstall npm package globally and locally. npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.  To remove a package you can use the uninstall command. To install npm refer to Downloading and installing Node.js and npm.

There are two ways as follows:-

  • npm, uninstall global.
  • npm, uninstall local.

Uninstall Local Packages

To uninstall a package that was installed locally (using npm install  and stored in the node_modules directory), use this command:

$ npm uninstall 

After that command is run, the package will no longer be in your node_modules folder.

To also remove the package from the dependencies list in your package.json file, you can use either the -S or --save flag:

$ npm uninstall  --save
$ npm uninstall -S 

If the package is a devDependency, you can remove it from the package.json file with the -D or --save-dev flags:

$ npm uninstall  --save-dev
$ npm uninstall -D 

Uninstall Global Packages

Last, you can remove any npm package you’ve installed globally with the -g flag:

$ npm uninstall -g 

The global uninstall command will work from wherever you call it on your machine.

  • Also, read Traffic Light simulator using only Html and CSS

Conclusion

I hope you liked this article on how to uninstall npm package. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

The post How to Uninstall Npm package appeared first on DotNetTec.



This post first appeared on Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps API Developer, please read the originial post: here

Share the post

How to uninstall npm package

×

Subscribe to Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps Api Developer

Get updates delivered right to your inbox!

Thank you for your subscription

×