pnpm list

This command will output 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

Options

NameDescription
--recursive, -rPerform command on every package in subdirectories or on every workspace package, 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
--globalList packages in the global install directory instead of in the current project
--depth <number>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
--dev, -DOnly list dev dependencies
--prod, -POnly list production dependencies
--no-optionalDon't list optionalDependencies
--filter <Filepath / Package>Filtering allows you to restrict commands to specific subsets of packages. pnpm supports a rich selector syntax for picking packages by name or by relation. More details: https://pnpm.io/filtering