Install

Docs:

See also my instructions in a gist for using a package manager.

NPM

$ npm install -g yarn

Brew

$ brew install yarn

Manual

$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash

Upgrade

NPM

Use NPM to upgrade Yarn.

$ npm upgrade -g yarn

Brew

$ brew upgrade yarn

Manual

If you installed using curl, then use the same install command again to upgrade Yarn. This method is recommended on the Yarn docs and in the help when the CLI tells you it is out of date.

$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash