Introduction to npm – How To Node – NodeJS
“The update command does a few things. – Search the registry for new versions of all the packages installed. – If there’s a newer version, then install it. – Point dependent packages at the new version, if it satisfies their dependency. – Remove the old versions, if no other package names them as a dependency. So basically, update behaves a lot like a “standard” package manager’s update command, except that it also checks to make sure that the new version isn’t going to break anything before it points stuff at it. You see, npm keeps you out of dependency hell.”