how to update npm pacakage code example Example 1: how to update npm npm install -g npm Example 2: npm update syntax npm outdated -g --depth=0