Aliases: ls
This command will output all the versions of packages that are installed, aswell as their dependencies, in a tree-structure.
Positional arguments are name-pattern@version-range identifiers, which willlimit the results to only the packages named. For example,pnpm list "babel-*" "eslint-*" semver@5.
Options--recursive, -rPerform command on every package in subdirectories or on every workspacepackage, when executed inside a workspace.
--jsonLog output in JSON format.
--longShow extended information.
--parseableOutputs package directories in a parseable format instead of their tree view.
--global, -gList packages in the global install directory instead of in the current project.
--depth Max display depth of the dependency tree.
pnpm ls --depth 0 (default) will list direct dependencies only.pnpm ls --depth -1 will list projects only. Useful inside a workspace whenused with the -r option.pnpm ls --depth Infinity will list all dependencies regardless of depth.
--prod, -PDisplay only the dependency graph for packages in dependencies andoptionalDependencies.
--dev, -DDisplay only the dependency graph for packages in devDependencies.
--no-optionalDon't display packages from optionalDependencies.
--only-projectsDisplay only dependencies that are also projects within the workspace.
--exclude-peersAdded in: v9.10.0
Exclude peer dependencies from the results (but dependencies of peer dependencies are not ignored).
--filter Read more about filtering.