Install Yarn
Switch yarn to specific version / latest version (yarn 1.x)
yarn policies set-version <version>
yarn policies set-version
Switch yarn to specific version / latest version (yarn 2.x)
yarn set version <version>
yarn set version latest
Show yarn version and help
Show information for a package
Show why a package was installed
List installed packages (local / global)
List only top level global packages
List packages that match pattern
Initialize package config in current folder (-y or --yes for default setup)
Generate new yarn lock file from installed packages
Install all configured package.json dependencies (dev and production)
Install new dev (-D), peer (-P), optional (-O) package
Global packages
Uninstall package (local, dev, global)
Upgrade packages or specific package (local, global) for current major
Upgrade packages or specific package to latest version regardless of package.json version ranges
Show outdated packages where new version exists
Run scripts from package.json
Check configured dependencies match lock file
Global Packages and Cache
Show location of global packages folder
Show direction of global cache
List all or matching packages in global cache
Clear the global cache
Display the current configuration
Set configuration values
Get configuration value
Delete configuration value