Aliases: ls
This command will print to stdout all the versions of packages that are installed, as well as their dependencies, in a tree-structure.
Positional arguments are name-pattern@version-range
identifiers, which will limit the results to only the packages named.
For example, pnpm list babel-* eslint-* semver@5
pnpm list [-r] [--filter <package selector>] [--depth <number>]
[<package pattern> ...]
pnpm recursive list [--filter <package selector>] [--depth <number>]
[<package pattern> ...]
Perform command on every package in subdirectories or on every workspace package, when executed inside a workspace.
Added in: 3.7.0
Show information in JSON format.
Show extended information.
Show parseable output instead of tree view.
List packages in the global install directory instead of in the current project.
Max display depth of the dependency tree.
pnpm ls --depth 0
will list direct dependencies only.
pnpm ls --depth -1
will list projects only. Useful inside a workspace when used with the -r
option.
Display only the dependency graph for packages in dependencies
and optionalDependencies
.
Display only the dependency graph for packages in devDependencies
.
Don't display packages from optionalDependencies
.