Installing a Module :
You can download and install the latest version of a package:
$ npm install <package name>
First change your current directory to your application root directory and then type:
$ npm install express
This will create the node_modules directory if it doesn’t already exist and install the express module under it.
You can also choose which version of a specific module to install by specifying it like this:
$ npm install <package name>@<version spec>
$ npm install firstname.lastname@example.org
Uninstalling a Module :
To uninstall the package with the specified name.
$ npm uninstall <package name>
If you want to remove a globally installed package, you should use:
$ npm uninstall -g <package name>