One of the easiest ways to install Yarn on macOS and generic Unix environments
is via our shell script. You can install Yarn by running the following code in
your terminal:
The installation process includes verifying a GPG signature.
View the source on GitHub
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version [version]
See the releases for possible versions.
You can install Yarn by downloading a tarball and
extracting it anywhere.
Before extracting Yarn, it is recommended that you verify the tarball using GPG:
wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --import
wget https://yarnpkg.com/latest.tar.gz.asc
gpg --verify latest.tar.gz.asc
# Look for "Good signature from 'Yarn Packaging'" in the output