Uninstalling packages with npm in JavaScript

To uninstall packages use the following command:

npm uninstall somelib

If the installation was in dev dependency, then you need to uninstall it with the appropriate flag:

npm uninstall -D somelib

Let's uninstall some library for example:

npm uninstall lodash

Install some library and then uninstall it.

enru