To show all globally installed npm packages on your computer, just run the following command:

npm list -g --depth 0

Here is my output:

/usr/local/lib
├── @nestjs/cli@8.1.6
├── corepack@0.10.0
├── create-next-app@12.0.8
├── cross-env@7.0.3
├── expo-cli@5.0.3
├── firebase-tools@9.12.1
├── i@0.3.7
├── live-server@1.2.1
├── node-gyp@8.1.0
├── nodemon@2.0.7
├── npm@8.3.0
├── ts-node@10.2.1
├── typescript@4.3.5
└── yarn@1.22.10

If you want to see all global packages and their dependencies, use this:

npm list -g

That’s it. Further reading:

You can also check out our Node.js category page for the latest tutorials and examples.