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.
Top comments (0)