title: How to uninstall an invalid global NPM package?
body: <p>When I list my globally installed packages, I get output like this:</p>
  
  <pre><code>home$ npm list -g --depth=0
  /usr/local/lib
  ├── n@2.1.4
  ├── npm@2.14.12
  ├── npm-check-updates@2.8.9
  ├── @acme/somelib@1.1.16 -&gt; /Users/me/projects/somelib (acme-somelib) invalid
  └── yarn@0.21.3
  </code></pre>
  
  <p>The "somelib" package above is reported as invalid. I'd like to remove the "somelib" package to be sure that it's not contributing to some other problem, and generally, just to keep things clean. But the uninstall command fails for me:</p>
  
  <pre><code>home$ npm uninstall -g @acme/somelib
  npm WARN uninstall not installed in /usr/local/lib/node_modules: "@acme/somelib"
  </code></pre>
  
  <p>I tried also to reinstall ( <code>npm install -g @acme/somelib</code> ) and then do an uninstall. In this case, the install creates a new and separate package that doesn't influence the invalid package. So that doesn't do anything to fix the problem.</p>
  
  <p>How do I get rid of the invalid package?</p>