Better Programming

Advice for programmers.

Follow publication

How to Check Your Globally Installed npm Packages

Matthew Williams
Better Programming
Published in
4 min readMar 9, 2020
npm Logo

Checking Your Global Packages

See every global package (including dependencies)

npm list -g
Output of npm list -g command
Not the easiest read

See only top-level packages

npm list -g --depth 0
Output of npm list -g — depth 0
Much easier to read

Removing a Global Package

sudo npm uninstall -g moment
Output of npm list -g — depth 0
The packages have vanished

Conclusion

Matthew Williams
Matthew Williams

Written by Matthew Williams

Senior software engineer, retired cheerleader, newly found writer — Melbourne, Victoria

Responses (1)

Write a response