title: How to remove all versions of node, including the one installed with brew?
body: <p>On MacOS I've got a bit of a mess with node, so I'm trying to uninstall all versions of node. Here's what I tried:</p>
  
  <pre><code>$ node --version
  -bash: /usr/local/opt/node@8/bin/node: No such file or directory
  $
  $ which node
  /usr/local/bin/node
  $ ls -l /usr/local/bin/node
  -rwxrwxr-x  1 hielke  admin  30994272 Oct  3 18:55 /usr/local/bin/node
  $ /usr/local/bin/node --version
  v6.11.4
  </code></pre>
  
  <p>As you can see, <code>node --version</code> refers to an uninstalled version 8.x of node. When I do <code>which node</code> however, it refers to <code>/usr/local/bin/node</code>, which is a binary of node version 6.x.</p>
  
  <p>And from here I'm left with the following questions:</p>
  
  <ol>
  <li>Why on earth does <code>node --version</code> refer to something different than <code>which node</code>? </li>
  <li>And can I simply remove the <code>/usr/local/bin/node</code> binary? </li>
  <li>And how can I remove the link to <code>/usr/local/opt/node@8/bin/node</code>?</li>
  </ol>
  
  <p>And most importantly: how can I clean up this mess so that I can install node completely fresh?</p>