yarn upgrade all code example

Example 1: yarn update all dependencies to latest

yarn upgrade --latest

Example 2: yarn 2 upgrade all packages

# Answer for Yarn 2 Upgrade All Packages

$ yarn plugin import interactive-tools
$ yarn upgrade-interactive

 Press / to select packages.      Press  to install.
 Press / to select versions.   Press  to abort.
 
 # And if U Want To Use The Old Command (yarn outdated) install this plugin
$ yarn plugin import https://github.com/mskelton/yarn-plugin-outdated/raw/main/bundles/@yarnpkg/plugin-outdated.js
$ yarn outdated

Example 3: yarn update all packages

yarn upgrade --latest
yarn upgrade left-pad --latest
yarn upgrade left-pad grunt --latest --tilde

Example 4: yarn update a specific package

yarn upgrade
yarn upgrade left-pad
yarn upgrade left-pad@^1.0.0
yarn upgrade left-pad grunt
yarn upgrade @angular

Tags:

Misc Example