LinuxCommandLibrary

npm-list

displays the dependency tree of installed packages

TLDR

List installed packages

$ npm list
copy
List global packages
$ npm list -g
copy
List only top-level packages
$ npm list --depth=0
copy
List as JSON
$ npm list --json
copy
List specific package
$ npm list [package-name]
copy
List production dependencies
$ npm list --prod
copy

SYNOPSIS

npm list [package] [options]

DESCRIPTION

npm list displays the dependency tree of installed packages. Shows versions and relationships. Use depth=0 for top-level only. Alias: npm ls.

PARAMETERS

-g, --global

List global packages.
--depth n
Dependency tree depth.
--json
Output as JSON.
--prod
Production dependencies only.
--dev
Development dependencies only.
--all
Show all packages.

SEE ALSO

npm(1), npm-install(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community