LinuxCommandLibrary

npm-ls

lists installed packages

TLDR

List installed packages

$ npm ls
copy
List all depths
$ npm ls --all
copy
List specific package
$ npm ls [package-name]
copy
List global packages
$ npm ls -g
copy
JSON output
$ npm ls --json
copy
Production only
$ npm ls --production
copy
Show depth
$ npm ls --depth=[2]
copy

SYNOPSIS

npm ls [package] [options]

DESCRIPTION

npm ls lists installed packages. Shows dependency tree.
The command displays package hierarchy. Identifies dependency versions.

PARAMETERS

PACKAGE

Package to find.
--all
Show all dependencies.
-g
Global packages.
--json
JSON output.
--depth N
Tree depth.
--help
Display help information.

CAVEATS

Alias: npm list. Tree can be large. Use depth to limit.

HISTORY

npm ls provides dependency visualization for understanding package relationships.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community