3 <title>removing-npm</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../cli/npm-removal.html">npm-removal</a></h1> <p>Cleaning the Slate</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <p>So sad to see you go.</p>
15 <pre><code>sudo npm uninstall npm -g</code></pre>
17 <p>Or, if that fails, get the npm source code, and do:</p>
19 <pre><code>sudo make uninstall</code></pre>
21 <h2 id="More-Severe-Uninstalling">More Severe Uninstalling</h2>
23 <p>Usually, the above instructions are sufficient. That will remove
24 npm, but leave behind anything you've installed.</p>
26 <p>If that doesn't work, or if you require more drastic measures,
29 <p>Note that this is only necessary for globally-installed packages. Local
30 installs are completely contained within a project's <code>node_modules</code>
31 folder. Delete that folder, and everything is gone (unless a package's
32 install script is particularly ill-behaved).</p>
34 <p>This assumes that you installed node and npm in the default place. If
35 you configured node with a different <code>--prefix</code>, or installed npm with a
36 different prefix setting, then adjust the paths accordingly, replacing
37 <code>/usr/local</code> with your install prefix.</p>
39 <p>To remove everything npm-related manually:</p>
41 <pre><code>rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*</code></pre>
43 <p>If you installed things <em>with</em> npm, then your best bet is to uninstall
44 them with npm first, and then install them again once you have a
45 proper install. This can help find any symlinks that are lying
48 <pre><code>ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm</code></pre>
50 <p>Prior to version 0.3, npm used shim files for executables and node
51 modules. To track those down, you can do the following:</p>
53 <pre><code>find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;</code></pre>
55 <p>(This is also in the <a href="../../doc/README.html">README</a> file.)</p>
57 <h2 id="SEE-ALSO">SEE ALSO</h2>
59 <ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul>
61 <p id="footer">removing-npm — npm@1.3.17</p>
64 var wrapper = document.getElementById("wrapper")
65 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
66 .filter(function (el) {
67 return el.parentNode === wrapper
68 && el.tagName.match(/H[1-6]/)
72 , toc = document.createElement("ul")
73 toc.innerHTML = els.map(function (el) {
74 var i = el.tagName.charAt(1)
84 out += "<li><a href='#" + el.id + "'>" +
85 ( el.innerText || el.text || el.innerHTML)
90 document.body.appendChild(toc)