how to get the list of npm global packages in your system code example Example: npm list global packages npm list -g --depth 0