Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Uninstall a global package – npm

Summary

To uninstall a global package, enter the following command in your terminal:

npm uninstall -g package-name

Details

To uninstall a global package, you can use the npm uninstall command with a -g flag. For example, if you wanted to uninstall the gatsby-cli package, you would enter the following command in your terminal:

npm uninstall -g gatsby-cli

If the package was uninstalled successfully, you should see something similar to the following print out in your terminal:

removed 91 packages in 0.731s

To check that the package was uninstalled, enter the following command in your terminal to list all of your global packages:

npm list -g --depth 0

Exercises

There are no exercises for this lesson.

Reference

Uninstalling global packages | npm Documentation

Back to: npm Reference > npm Global Packages