Import the repository's GPG key
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Enable the Yarn APT repository
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
If you have Node already installed using NVM, simply update the package index and install Yarn without Node
sudo apt update && sudo apt install --no-install-recommends yarn
Verify Yarn is installed
yarn --version
Source: https://linuxize.com/post/how-to-install-yarn-on-debian-9/