Click Below to subscribe

How to Install Yarn Package on Ubuntu 2021

Yarn is a package manager that doubles down as project manager. Whether you work on one-shot projects or large monorepos, as a hobbyist or an enterprise user, we've got you covered.

Firstly you need to import the repository's GPG key by following the command.

curl -sS | sudo apt-key add -

After that, you need to add the Yarn APT repository to your system’s software repository list by typing.

echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Once above process completed, update the package list, and install Yarn, with the following commands.

sudo apt update
sudo apt install yarn

after successful installation, run the following command which will print the Yarn version number.

yarn --version

Leave Your Comment