How To List All The Globally Installed NPM Packages

    Mar 21, 2019       by Pankaj Kumar
global-packages-npm.jpg

While application development, We come across situation to install some package locally to the working application and some package globally so that it can be used at other application also. 

 

Below is the npm command to list all the globally installed packages. If sometime it is needed to show the list of globally installed packages then it can be achieved easily with npm command. 

npm list -g --depth=0

 

Once we run the above command, all the global package will be listed below. Let's understand the arguments passed above:

list -g: display list of every package found in the user’s folders
depth 0 / depth=0: avoid including every package’s dependencies in the tree view, in other words, max display depth of the dependency tree

global packages

 

Conclusion

So in this article, We learn how to list all the globally installed NPM packages.

 

That’s all for now. Thank you for reading and I hope this article will be very helpful to understand how to list all the globally installed NPM package.

Let me know your thoughts over the email demo.jsonworld@gmail.com. I would love to hear them and If you like this article, share with your friends.

npm

WHAT'S NEW

Find other similar Articles here: