How to install yarn on Ubuntu 23.04

server
1 min read

2 easy steps to install and validate yarn while also covering a one-step method to uninstall yarn from your machine.

This post tries to capture the steps that we need for installing Yarn on our machine running Ubuntu 23.04. The same set of steps can be used to install yarn on any machine already running NodeJS.

Prerequisites:

Steps to install yarn

It is recommended to install Yarn through the npm package manager, which comes bundled with Node.js when you install it on your system.

Using NPM:

npm install --global yarn

or the shorthand as:

npm i -g yarn

Verify the installation:

yarn —version

Remove Yarn

npm uninstall -g yarn