Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux application queries.
In this context, we shall look into how to install the Yarn dependency package manager on Linux Mint 20 distribution.
If you need to perform this Installation on Ubuntu, then have a look at our guide on how to install Yarn on Ubuntu 20.04 system.
Steps to Install Yarn on Linux Mint 20
Yarn is not available in the default official Linux Mint repository. However, this package manager can install it by including an external official yarn repository to your system. For yarn installation using its official repository, perform the below-given steps.
1. Install Curl
To begin, open the terminal from your system's taskbar. Now, by running the following command update the apt-cache:
$ sudo apt update
Curl comes pre-installed on Linux Mint 20 distribution. However, if curl utility is not installed on your LinuxMint system then, you can easily install by executing the below-mentioned command:
$ sudo apt install curl
2. Import the official yarn repository's GPG key
Now, import or add the Yarn repository's GPG key on your system by running the below-given command:
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
In case of successful completion, the 'OK' message will display on the terminal its meaning that the key is imported successfully.
3. Add Yarn repository
Enable and add the official yarn repository by using the below-mentioned command:
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" |
sudo tee /etc/apt/sources.list.d/yarn.list
4. Install Yarn
Again, update the apt packages cache and type the following command to install the yarn on Linux Mint 20:
$ sudo apt update
$ sudo apt install yarn
Now, the user confirmation dialog prompts you to enter 'y' and then press 'Enter' to confirm the installation of yarn packages on your system. The yarn packages including NodeJS will install on your system. If you don't need to install the NodeJS package then, install yarn using an alternate command as follows:
$ sudo apt install --no-install-recommends yarn
This command will install the all yarn packages without installing NodeJS on your system.
5. Verify yarn Installation
Run the below command to Verify the yarn installation by displaying the installed version on the terminal window:
$ yarn --version
This will display the yarn version installed on this system.
How to Uninstall Yarn packages from Linux Mint 20 ?
If You don't need the yarn application on your system and want to uninstall it from your system then, using the following command can completely remove the yarn packages from your Linux Mint or Ubuntu system:
$ sudo apt purge --remove yarn
To complete the uninstallation process, simply press 'Y' and then hit 'Enter'.
[Need assistance in fixing missing Linux Software packages ? We can help you. ]