How can I update npm itself?

I am trying to update npm itself:

npm uninstall npm -g

Responds with:

unbuild [email protected]

But when I go:

npm --version

I get 1.4.28? How to upgrade the npm itself?


By using this command you can update npm to the latest release by using npm itself :

 npm i -g npm@latest

You can try this:

cd /usr/lib/node_modules

npm install npm@latest

Edit:

npm install -g npm worked for me.

enter image description here


See which version you have

npm -v

Install the newest npm update

npm install -g npm@latest

Upgrade to the most recent release

npm install -g npm@next 

Upgrading on Windows Microsoft wrote a small command-line tool to automate the steps below. You can go and download it here

https://docs.npmjs.com/try-the-latest-stable-version-of-npm