https://tecadmin.net/install-yarn-debian/
The yarn is an advanced package management software for Node.js applications. It is a fast, secure, and reliable alternative that any other Nodejs package manager’s. I have installed latest Node.js on Ubuntu and Debian systems.
This tutorial contains three methods to install Yarn on Ubuntu, Debian, and LinuxMint systems. Use one of the following methods:
Yarn package is available to install with NPM. You can simply use npm command as following to install Yarn globally. To install yarn for the current project only just remove -g option from the command.
Check installed version:
Yarn also provides a shell script for installation. This is the most recommended way to install Yarn on a Linux system. This script downloads the yarn archive and extracts under the .yarn directory under your home directory. Also, set the PATH environment variable.
As this installation put all files under users home directory, So it is available for current user only.
The Yarn team also provides an Apt repository to install yarn on Debian machine. Run the following commands to import gpg key and configure yarn apt repository.
Now type following commands to install yarn on Ubuntu Debian and Linux.