npm Cheat Sheet/List installed packages

Show installed dependency tree.

Section: Inspect packages and metadata

List installed packages

bash
bash
npm ls
Explanation

Show installed dependency tree.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Inspect packages and metadata
Show outdated packages
List packages with newer available versions.
OpenIn sheetbashsame section
Query installed packages
Query dependency tree nodes using selectors.
OpenIn sheetbashsame section
Show funding information
Display funding URLs for dependencies.
OpenIn sheetbashsame section
View package metadata
Show metadata from the registry.
OpenIn sheetbashsame section
View latest package version
Show the current published version.
OpenIn sheetbashsame section
Explain why a package is installed
Show why a package exists in the dependency tree.
OpenIn sheetbashsame section