yarn list
List installed packages.
yarn list
yarn list
The yarn list command mimics the expected Unix behavior of listing. In Yarn, the list
command lists all dependencies for the current working directory by referencing all
package manager meta data files, which includes a project’s dependencies.
yarn list vx.x.x
├─ package-1@1.3.3
├─ package-2@5.0.9
│ └─ package-3@^2.1.0
└─ package-3@2.7.0
yarn list [--depth] [--pattern]
By default, all packages and their dependencies will be displayed. To restrict the depth of the
dependencies, you can add a flag, --depth, along with the desired level to the list command.
yarn list --depth=0
Keep in mind, levels are zero-indexed.
yarn list --pattern <pattern> will filter the list of dependencies by the pattern flag.
Examples:
yarn list --pattern gulp
yarn list --pattern "gulp|grunt"
yarn list --pattern "gulp|grunt" --depth=1
- CLI Introduction
- yarn add
- yarn audit
- yarn autoclean
- yarn bin
- yarn cache
- yarn check
- yarn config
- yarn create
- yarn dedupe
- yarn generate-lock-entry
- yarn global
- yarn help
- yarn import
- yarn info
- yarn init
- yarn install
- yarn licenses
- yarn link
- yarn lockfile
- yarn login
- yarn logout
- yarn outdated
- yarn owner
- yarn pack
- yarn policies
- yarn prune
- yarn publish
- yarn remove
- yarn run
- yarn self-update
- yarn tag
- yarn team
- yarn test
- yarn unlink
- yarn upgrade
- yarn upgrade-interactive
- yarn version
- yarn versions
- yarn why
- yarn workspace
- yarn workspaces
