Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

Using npm, how do you uninstall a package?

Experience Level: Junior
Tags: npm

Answer

If you want to uninstall a local npm package, open a command-line, go to your project directory that contains a file package.json and run the following command:

npm uninstall <package-name>

To uninstall a global npm package, open a command-line, go to your project directory that contains a file package.json and run the following command:

npm uninstall -g <package-name>

Comments

No Comments Yet.
Be the first to tell us what you think.
npm for beginners
npm for beginners

Are you learning npm ? Try our test we designed to help you progress faster.

Test yourself