title: Uninstalling the currently active version of node.js with nvm
body: <p>On Ubuntu 16.04, I mistakenly used root to install nvm, and then to install node.js 8.8.1 via nvm. I also used <code>nvm alias default 8.8.1</code>, thinking it would correct my error.</p>
  
  <p>Now I would like to:</p>
  
  <ol>
  <li>Remove the default alias</li>
  <li>Uninstall node 8.8.1</li>
  <li>Uninstall npm 4.8.5, which came along with node</li>
  <li>Uninstall nvm</li>
  <li>Reinstall everything correctly for the right non-sudo user</li>
  </ol>
  
  <p>It looks like I've succeeded with the first part:</p>
  
  <pre><code># nvm unalias default
  Deleted alias default - restore it with `nvm alias "default" "8.8.1"`
  </code></pre>
  
  <p>But nvm refuses to uninstall node 8.8.1, because it is the only version installed:</p>
  
  <pre><code># nvm uninstall 8.8.1                                                                                                                             
  nvm: Cannot uninstall currently-active node version, v8.8.1 (inferred from 8.8.1).
  </code></pre>
  
  <p>I am guessing that I first need to disactivate node 8.8.1, but I see nothing in the output of <code>nvm --help</code> which would appear to do this.</p>
  
  <p>What steps do I need to take to completely remove node.js, npm and nvm from the machine before re-installing everything correctly?</p>