Reference Link :: https://linuxize.com/post/how-to-install-yarn-on-ubuntu-18-04/ 1. Enable the Yarn repository. Start by importing the repository’s GPG key using the following curl command : curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 2. Once the repository is added to the system, update the package list, and install Yarn, with: $ sudo apt update $ sudo apt install yarn 3. If you already don’t have Node.js installed on your system , the command above will install it. Those who are using nvm can skip the Node.js installation with: sudo apt install --no-install-recommends yarn 4. To verify that Yarn installed successfully, run the following commands which will print the Yarn version number: $ yarn --version