
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
npm-install-global
Advanced tools
Simple API for globally installing or uninstalling one or more NPM packages.
Simple API for globally installing or uninstalling one or more NPM packages.
Install with npm:
$ npm install --save npm-install-global
Install with yarn:
$ yarn add npm-install-global
var npm = require('npm-install-global');
// easily install packages
npm.install('generate', function(err) {
if (err) return console.log(err);
});
// or remove outdated packages
npm.uninstall('yeoman', function(err) {
if (err) return console.log(err);
});
// or install only packages that don't already exist
npm.maybeInstall(['foo', 'bar'], function(err) {
if (err) return console.log(err);
});
Execute npm --global with the given command and one or more package names. This is the base for install and uninstall.
Params
names {String|Array}: One or more package names.cb {Function}: CallbackExample
npm('install', 'verb', function(err) {
if (err) throw err;
});
Execute npm [cmd] --global with one or more package names.
Params
cmd {String}: The command to runnames {String|Array}: One or more package names.cb {Function}: CallbackExample
npm.global('install', 'generate', function(err) {
if (err) throw err;
});
Execute npm install --global with one or more package names.
Params
names {String|Array}: One or more package names.cb {Function}: CallbackExample
npm.install('generate', function(err) {
if (err) throw err;
});
Install the given packages if they are not already installed.
Params
names {String|Array}: One or more package names.cb {Function}: CallbackExample
npm.maybeInstall(['foo', 'bar', 'baz'], function(err) {
if (err) throw err;
});
Execute npm uninstall --global with one or more package names.
Params
names {String|Array}: One or more package names.cb {Function}: CallbackExample
npm.uninstall('yeoman', function(err) {
if (err) throw err;
});
v1.0.0
v0.1.1
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on April 29, 2017.
FAQs
Simple API for globally installing or uninstalling one or more NPM packages.
We found that npm-install-global demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.