{"id":10204,"date":"2021-09-20T18:26:51","date_gmt":"2021-09-20T18:26:51","guid":{"rendered":"https:\/\/linuxways.net\/?p=10204"},"modified":"2021-09-20T18:26:51","modified_gmt":"2021-09-20T18:26:51","slug":"how-to-install-yarn-on-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-install-yarn-on-linux-mint-20\/","title":{"rendered":"How to Install Yarn on Linux Mint 20"},"content":{"rendered":"<p>User needs an automated tool to manage the project or application dependencies. Yarn is the most popular secure and reliable JavaScript package and dependency management tool. It is an open-source and fast package manager that keeps the cache of each downloaded package and you can again use this package when it is required without downloading the package again.\u00a0 Yarn checks the integrity of each package before its code execution. The main feature of yarn is its efficiency so that this tool works offline as well as in the network.<\/p>\n<p>This tutorial will provide you a complete guide on how to install the Yarn dependency package manager on LinuxMint 20 distribution. If you want to search <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-yarn-on-ubuntu-20-04\/\">how to install Yarn on Ubuntu 20.04<\/a> system then use this highlighted link.<\/p>\n<h2><strong>Yarn installation on Linux Mint 20<\/strong><\/h2>\n<p>Yarn is not present in the default official LinuxMint 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 provided steps:<\/p>\n<h3><strong>Step 1: Install Curl<\/strong><\/h3>\n<p>First, open the terminal from your system\u2019s taskbar. Now, by running the following command update the apt-cache:<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Curl comes pre-installed on LinuxMint 20 distribution. However, if curl utility is not installed on your LinuxMint system then, you can easily install by executing the below-mentioned command:<\/p>\n<pre>$ sudo apt install curl<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"210\" class=\"wp-image-10205\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-371.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-371.png 984w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-371-300x64.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-371-768x164.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/p>\n<h3><strong>Step 2: Import the official yarn repository\u2019s GPG key<\/strong><\/h3>\n<p>Now, import or add the Yarn repository\u2019s GPG key on your system by running the below-given command:<\/p>\n<pre>$ curl -sS https:\/\/dl.yarnpkg.com\/debian\/pubkey.gpg | sudo apt-key add -<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"114\" class=\"wp-image-10206\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-372.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-372.png 983w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-372-300x35.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-372-768x89.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/p>\n<p>In case of successful completion, the \u2018OK\u2019 message will display on the terminal its meaning that the key is imported successfully.<\/p>\n<h3><strong>Step 3: Include Yarn repository<\/strong><\/h3>\n<p>Enable and add the official yarn repository by using the below-mentioned command:<\/p>\n<pre>$ echo \"deb https:\/\/dl.yarnpkg.com\/debian\/ stable main\" |<\/pre>\n<pre>sudo tee \/etc\/apt\/sources.list.d\/yarn.list<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"112\" class=\"wp-image-10207\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-373.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-373.png 979w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-373-300x34.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-373-768x88.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<h3><strong>Step 4: Install Yarn<\/strong><\/h3>\n<p>Again, update the apt packages cache and type the following command to install the yarn on LinuxMint 20:<\/p>\n<pre>$ sudo apt update<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"579\" class=\"wp-image-10208\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-374.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-374.png 984w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-374-300x177.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-374-768x452.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/p>\n<pre>$ sudo apt install yarn<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"987\" height=\"624\" class=\"wp-image-10209\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/c-users-dell-desktop-tempsnip-png-1.png\" alt=\"C:\\Users\\DELL\\Desktop\\tempsnip.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/c-users-dell-desktop-tempsnip-png-1.png 987w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/c-users-dell-desktop-tempsnip-png-1-300x190.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/c-users-dell-desktop-tempsnip-png-1-768x486.png 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/p>\n<p>Now, the user confirmation dialog prompts you to enter \u2018y\u2019 and then press \u2018Enter\u2019 to confirm the installation of yarn packages on your system. The yarn packages including NodeJS will install on your system. If you don\u2019t need to install the NodeJS package then, install yarn using an alternate command as follows:<\/p>\n<pre>$ sudo apt install --no-install-recommends yarn<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"184\" class=\"wp-image-10210\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-375.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-375.png 980w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-375-300x56.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-375-768x144.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/p>\n<p>The above-mentioned command installs the all yarn packages without installing NodeJS on your system.<\/p>\n<h3><strong>Step 5: Verify yarn Installation<\/strong><\/h3>\n<p>Verify the yarn installation by displaying the installed version on the terminal window:<\/p>\n<pre>$ yarn --version<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"88\" class=\"wp-image-10211\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-376.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-376.png 983w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-376-300x27.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-376-768x69.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/p>\n<p>As you can see in the above screenshot, the yarn version 1.22.5 has been installed on this system.<\/p>\n<h2><strong>Uninstall Yarn packages from Linux Mint 20<\/strong><\/h2>\n<p>You don\u2019t need the yarn application on your system and want to uninstall it from your system then, using the following command you can completely remove the yarn packages from your Linux Mint or Ubuntu system:<\/p>\n<pre>$ sudo apt purge --remove yarn<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"411\" class=\"wp-image-10212\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-377.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-377.png 972w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-377-300x127.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-377-768x325.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/p>\n<p>To continue the uninstallation of yarn press \u2018Y\u2019 and then hit \u2018Enter\u2019.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>We explained in this tutorial how to install yarn on Linux Mint 20 distribution using the command line method. This tool is a good dependency package manager that is very helpful for experienced developers as well as for learners. We also mentioned how to uninstall the yarn tool from LinuxMint 20 distro.<\/p>","protected":false},"excerpt":{"rendered":"<p>User needs an automated tool to manage the project or application dependencies. Yarn is the most popular secure and reliable JavaScript package and dependency management tool. It is&hellip;<\/p>","protected":false},"author":1,"featured_media":10320,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[129,551],"class_list":["post-10204","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-linux-mint-20","tag-yarn"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=10204"}],"version-history":[{"count":1,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10204\/revisions"}],"predecessor-version":[{"id":10213,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10204\/revisions\/10213"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/10320"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=10204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=10204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=10204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}