npm get list of globally installed packages code example Example: npm list global packages npm list -g --depth 0