DEV Community

loading...
Cover image for How to get a list of your globally installed NPM packages? The easy way.

How to get a list of your globally installed NPM packages? The easy way.

juniorbatistard profile image Junior Batista ・1 min read

If you have use NPM for some time you'd know that you can install packages using the -g flag.

At one point you would like to get a list of all you globally installed packages. You can accomplish that with npm list -g but that will show you an overwhelming list.

For a more user-friendly approach, I would recommend using npm list -g --depth 0 instead.

The inclusion of the --depth 0 flag means that npm will only list the packages at the top level of the tree.

Discussion (0)

pic
Editor guide