update version of package npm code example
Example 1: upgrade npm version
npm install -g npm@latest
Example 2: how to change version of npm
cd ~/.nvm/versions/node/v4.2.2/lib
npm install npm
npm install -g npm@latest
cd ~/.nvm/versions/node/v4.2.2/lib
npm install npm