title: How to upgrade npm version to latest? Ubuntu shows successful install but doesn't upgrade version
body: <p>I'm working on a gcloud compute instance running ubuntu 18.04 lts minimal and have installed npm. However, apt-get install npm came up with 3.5.2, and when I do <code>npm install npm@latest -g</code>, it shows that I have to run as administrator. When I append sudo, it runs but <code>npm -v</code> returns 3.5.2 and not the latest version. Why is this so?</p>
  
  <pre><code>engineering@test2:~$ sudo npm install npm@latest -g
  /usr/local/bin/npm -&gt; /usr/local/lib/node_modules/npm/bin/npm-cli.js
  /usr/local/bin/npx -&gt; /usr/local/lib/node_modules/npm/bin/npx-cli.js
  + npm@6.4.1
  added 274 packages, removed 363 packages and updated 43 packages in 8.462s
  engineering@test2:~$ npm -v
  3.5.2
  </code></pre>