check all the packages installed globally via node code example Example: list npm packages installed globally npm list -g --depth 0