title: Unable to update npm?
body: <p>This Error keeps happening for me when i'm trying to update <strong>NPM</strong> for some work. I have used this always it before in <strong>Windows Command Prompt</strong> but not in <strong>Linux Bash</strong> </p>
  
  <p><strong>npm i -g npm</strong></p>
  
  <pre><code>Specify configs in the ini-formatted file:
  /root/.npmrc
  or on the command line via: npm &lt;command&gt; --key value
  Config info can be viewed via: npm help config
  
  npm@5.6.0 /usr/lib/node_modules/npm
  root@DESKTOP-SJPLLRG:~# npm -v
  5.6.0
  root@DESKTOP-SJPLLRG:~# npm i -g npm
  npm ERR! path /usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each
  npm ERR! code EACCES
  npm ERR! errno -13
  npm ERR! syscall rename
  npm ERR! Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each' -&gt; '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE'
  npm ERR!  { Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each' -&gt; '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE'
  npm ERR!   cause:
  npm ERR!    { Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each' -&gt; '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE'
  npm ERR!      errno: -13,
  npm ERR!      code: 'EACCES',
  npm ERR!      syscall: 'rename',
  npm ERR!      path: '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each',
  npm ERR!      dest: '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE' },
  npm ERR!   stack: 'Error: EACCES: permission denied, rename \'/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each\' -&gt; \'/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE\'',
  npm ERR!   errno: -13,
  npm ERR!   code: 'EACCES',
  npm ERR!   syscall: 'rename',
  npm ERR!   path: '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each',
  npm ERR!   dest: '/usr/lib/node_modules/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/.stream-each.DELETE',
  npm ERR!   parent: 'mississippi' }
  npm ERR!
  npm ERR! Please try running this command again as root/Administrator.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2018-06-21T13_00_43_617Z-debug.log
  </code></pre>
  
  <p>Some details on my environment:</p>
  
  <p>1) I used Windows Subsystem for Linux Platform for installation of Node.js</p>
  
  <p>2) I tried it while I was in root only. </p>
  
  <p>3) I tried to update the NPM package using some command shown in this <a href="https://stackoverflow.com/questions/23393707/how-to-update-npm">NPM update Link</a></p>
  
  <p>But Still not able to perform the update. It shows the following error </p>
  
  <pre><code>root@DESKTOP-SJPLLRG:~# npm install npm -g
  -bash: /usr/bin/npm: No such file or directory
  root@DESKTOP-SJPLLRG:~#
  </code></pre>
  
  <p>I'm stuck to even proceed further. Is there something that can be done to clear up this error and update NPM ?</p>
  
  <p>Edit No 2: </p>
  
  <p>I have tried to reinstall Node.js and NpM but below error pops up</p>
  
  <pre><code>ash@DESKTOP-SJPLLRG:~$ sudo apt-get install npm
  [sudo] password for ash:
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
  
  The following packages have unmet dependencies:
   npm : Depends: nodejs but it is not going to be installed
         Depends: node-abbrev (&gt;= 1.0.4) but it is not going to be installed
         Depends: node-ansi (&gt;= 0.3.0-2) but it is not going to be installed
         Depends: node-ansi-color-table but it is not going to be installed
         Depends: node-archy but it is not going to be installed
         Depends: node-block-stream but it is not going to be installed
         Depends: node-fstream (&gt;= 0.1.22) but it is not going to be installed
         Depends: node-fstream-ignore but it is not going to be installed
         Depends: node-github-url-from-git but it is not going to be installed
         Depends: node-glob (&gt;= 3.1.21) but it is not going to be installed
         Depends: node-graceful-fs (&gt;= 2.0.0) but it is not going to be installed
         Depends: node-inherits but it is not going to be installed
         Depends: node-ini (&gt;= 1.1.0) but it is not going to be installed
         Depends: node-lockfile but it is not going to be installed
         Depends: node-lru-cache (&gt;= 2.3.0) but it is not going to be installed
         Depends: node-minimatch (&gt;= 0.2.11) but it is not going to be installed
         Depends: node-mkdirp (&gt;= 0.3.3) but it is not going to be installed
         Depends: node-gyp (&gt;= 0.10.9) but it is not going to be installed
         Depends: node-nopt (&gt;= 3.0.1) but it is not going to be installed
         Depends: node-npmlog but it is not going to be installed
         Depends: node-once but it is not going to be installed
         Depends: node-osenv but it is not going to be installed
         Depends: node-read but it is not going to be installed
         Depends: node-read-package-json (&gt;= 1.1.0) but it is not going to be installed
         Depends: node-request (&gt;= 2.25.0) but it is not going to be installed
         Depends: node-retry but it is not going to be installed
         Depends: node-rimraf (&gt;= 2.2.2) but it is not going to be installed
         Depends: node-semver (&gt;= 2.1.0) but it is not going to be installed
         Depends: node-sha but it is not going to be installed
         Depends: node-slide but it is not going to be installed
         Depends: node-tar (&gt;= 0.1.18) but it is not going to be installed
         Depends: node-underscore but it is not going to be installed
         Depends: node-which but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
  </code></pre>
  
  <p>Can you guys provide me any technique to reinstall both Node.js and NPM?</p>