How to Install Yarn on Ubuntu 23.04

Jun 21, 2023 · 1 min read · Post a comment

Yarn is a package manager created as an alternative to the npm client, providing enhancements in terms of performance, reliability, and security. Let’s see how to install yarn on ubuntu 23.04


  • sudo privileges

Install Yarn on Ubuntu 23.04

Step 1. Update your Ubuntu packages.

sudo apt update

Step 2. Install the required packages.

sudo apt install -y curl

Step 3. Import the Yarn GPG key.

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

Step 4. Add the Yarn repository.

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Step 5. Update your package index and install Yarn.

sudo apt update
sudo apt install -y yarn

Step 6. Verify the installation.

yarn --version


Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.