How to list all the installed NPM packages

Last updated on Jun 1, 2022 by Suraj Sharma



In this tutorial, you will learn to list all the installed npm packages on your system whether it is globally installed or installed locally to a project.


List all the globally installed NPM packages


To list all the globally installed NPM packages, type the following npm command on your terminal,

npm list -g --depth=0

list of all globally installed npm packages


depth=0 only lists the root packages in a tree view, hence skips the package dependencies.


List all the locally installed NPM packages


To list all the globally installed NPM packages in a project, use,


 npm list --depth=0


Related Solutions


Rate this post


Suraj Sharma is the founder of Future Gen AI Services. He holds a B.Tech degree in Computer Science & Engineering from NIT Rourkela.