npmjs.com

uninstall a package programmatically

npm.commands.uninstall(packages, callback)

This acts much the same ways as uninstalling on the command-line.

The 'packages' parameter is an array of strings. Each element in the array is the name of a package to be uninstalled.

Finally, 'callback' is a function that will be called when all packages have been uninstalled or when an error has been encountered.

Last modified December 17, 2014           Found a typo? Send a pull request!

Getting Started

Using npm

npm Enterprise

CLI Commands

Configuring npm

Using npm programmatically

npm policy documents

View All On One Page