There are multiple ways to install yarn on Debian 11. Here I’m going to show you how to install Yarn on Debian 11 via APT.
Prerequisites
- Debian
- sudo access
Install Yarn on Debian 11
Step 1. Import the GPG key repo.
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
Step 2. Enable the Yarn APT repository.
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Step 3. Update the APT packages.
apt update
Step 4. Install Yarn.
apt install yarn
Step 5. Verify the installation.
yarn -v
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.