how to update yarn command line code example Example 1: install yarn npm install -g yarn Example 2: how to upgrade package yarn global yarn global add <package>@latest