This is image from the internet.
nvm doesn’t let you update only npm, but just a node+npm version. But there is a really easy way to do it:
# navigate to nvm's node lib folder # (replace v8.4.0 with your version) cd ~/.nvm/versions/node/v8.4.0/lib/ # update npm right there npm install npm # reopen your terminal
That’s it. Great thing is that npm can update itself. And this works for any other global npm package.