{"id":9918,"date":"2025-03-17T03:00:00","date_gmt":"2025-03-17T07:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=9918"},"modified":"2025-03-08T11:54:36","modified_gmt":"2025-03-08T16:54:36","slug":"update-linux-from-the-command-line","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=9918","title":{"rendered":"Update Linux from the command line"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"9918\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>One common task on a desktop computer is applying updates. Software updates keep your system on the latest patches, ensuring that everything runs smoothly.<\/p>\n\n\n\n<p>If you run a graphical desktop like KDE or Xfce or GNOME, you probably use the built-in tool to apply updates. But you can also install updates from the command line. This is very useful for servers, or for some other Linux system that runs in <em>text mode<\/em>. Here\u2019s how to do it:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"list-the-updates-to-apply\">List the updates to apply<\/h2>\n\n\n\n<p>Fedora Linux uses the <strong>dnf<\/strong> package manager. Although the latest Fedora actually uses <strong>dnf5<\/strong>, the system provides an <em>alias<\/em> as <strong>dnf<\/strong> so you can run it with either command name.<\/p>\n\n\n\n<p>The general usage of <strong>dnf<\/strong> is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf5 subcommand &#91;options..] &#91;arguments..]<\/code><\/pre>\n\n\n\n<p>To list the updates that are available to install on your system, use the <code>list<\/code> subcommand, which can list the packages that are already installed or the packages that can be installed. To list the updates, use <code>--upgrades<\/code> as the option to the <code>list<\/code> subcommand:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf list --upgrades<\/code><\/pre>\n\n\n\n<p>An alias to <code>--upgrades<\/code> is <code>--updates<\/code>, which I find easier to remember because I want to <em>update<\/em> the packages on my system.<\/p>\n\n\n\n<p>When I ran the command on my system, I saw that there were four updates available to install:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf list --updates\nUpdating and loading repositories:\nRepositories loaded.\nAvailable upgrades\nlibcupsfilters.x86_64   1:2.1.1-1.fc41 updates\nllvm-libs.x86_64        19.1.7-3.fc41  updates\npython3-boto3.noarch    1.37.7-1.fc41  updates\npython3-botocore.noarch 1.37.7-1.fc41  updates<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-the-updates\">Install the updates<\/h2>\n\n\n\n<p>To install the updates on your system, use the <code>update<\/code> subcommand Since I only have four available available to update, the <strong>dnf<\/strong> command first lists the packages, then asks if I <em>really<\/em> want to proceed with the update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf update\nUpdating and loading repositories:\nRepositories loaded.\nPackage                       Arch   Version                 Repositor      Size\nUpgrading:\n libcupsfilters               x86_64 1:2.1.1-1.fc41          updates     1.5 MiB\n   replacing libcupsfilters   x86_64 1:2.1.0-6.fc41          &lt;unknown&gt;   1.5 MiB\n llvm-libs                    x86_64 19.1.7-3.fc41           updates   124.5 MiB\n   replacing llvm-libs        x86_64 19.1.7-2.fc41           &lt;unknown&gt; 124.5 MiB\n python3-boto3                noarch 1.37.7-1.fc41           updates     2.1 MiB\n   replacing python3-boto3    noarch 1.37.5-1.fc41           &lt;unknown&gt;   2.1 MiB\n python3-botocore             noarch 1.37.7-1.fc41           updates   100.1 MiB\n   replacing python3-botocore noarch 1.37.5-1.fc41           &lt;unknown&gt;  99.8 MiB\n\nTransaction Summary:\n Upgrading:          4 packages\n Replacing:          4 packages\n\nTotal size of inbound packages is 40 MiB. Need to download 40 MiB.\nAfter this operation, 361 KiB extra will be used (install 228 MiB, remove 228 MiB).\nIs this ok &#91;y\/N]: <\/code><\/pre>\n\n\n\n<p>If you\u2019re ready to proceed, press <strong>y<\/strong> on your keyboard. You\u2019ll see <strong>dnf<\/strong> download all the updates, then install them:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nIs this ok &#91;y\/N]: y\n&#91;1\/4] python3-boto3-0:1.37.7-1.fc41.noa 100% | 629.5 KiB\/s | 419.9 KiB |  00m01s\n&#91;2\/4] libcupsfilters-1:2.1.1-1.fc41.x86 100% | 762.1 KiB\/s | 605.9 KiB |  00m01s\n&#91;3\/4] python3-botocore-0:1.37.7-1.fc41. 100% |   2.1 MiB\/s |   7.8 MiB |  00m04s\n&#91;4\/4] llvm-libs-0:19.1.7-3.fc41.x86_64  100% |   3.5 MiB\/s |  31.5 MiB |  00m09s\n--------------------------------------------------------------------------------\n&#91;4\/4] Total                             100% |   4.2 MiB\/s |  40.3 MiB |  00m09s\nRunning transaction\n&#91; 1\/10] Verify package files            100% |  13.0   B\/s |   4.0   B |  00m00s\n&#91; 2\/10] Prepare transaction             100% |  16.0   B\/s |   8.0   B |  00m00s\n&#91; 3\/10] Upgrading python3-botocore-0:1. 100% |  45.1 MiB\/s | 100.6 MiB |  00m02s\n&#91; 4\/10] Upgrading python3-boto3-0:1.37. 100% |  22.6 MiB\/s |   2.1 MiB |  00m00s\n&#91; 5\/10] Upgrading llvm-libs-0:19.1.7-3. 100% | 152.2 MiB\/s | 124.5 MiB |  00m01s\n&#91; 6\/10] Upgrading libcupsfilters-1:2.1. 100% |  43.2 MiB\/s |   1.6 MiB |  00m00s\n&#91; 7\/10] Removing python3-boto3-0:1.37.5 100% |  22.8 KiB\/s | 187.0   B |  00m00s\n&#91; 8\/10] Removing python3-botocore-0:1.3 100% | 154.8 KiB\/s |   2.8 KiB |  00m00s\n&#91; 9\/10] Removing llvm-libs-0:19.1.7-2.f 100% |   2.9 KiB\/s |  18.0   B |  00m00s\n&#91;10\/10] Removing libcupsfilters-1:2.1.0 100% |  42.0   B\/s |  39.0   B |  00m01s\nComplete!<\/code><\/pre>\n\n\n\n<p>To skip this confirmation when you install updates, add the <code>-y<\/code> or <code>--assumeyes<\/code> option:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf update --assumeyes<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"learn-more\">Learn more<\/h2>\n\n\n\n<p>The <em>dnf5-list<\/em>(8) manual page has full documentation about the <code>list<\/code> subcommand, including the <code>--installed<\/code> option to list only the <em>installed<\/em> packages, or <code>--available<\/code> to list only the packages that are <em>available<\/em> to install. For more information on the <code>install<\/code> subcommand, see the <em>dnf5-install<\/em>(8) manual page. The <code>update<\/code> subcommand is an alias of <code>upgrade<\/code>; you can find full documentation in the <em>dnf5-upgrade<\/em>(8) manual page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Be a power user by updating your system from the command line.<\/p>\n","protected":false},"author":33,"featured_media":4654,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[100,5],"tags":[104,732,91],"class_list":["post-9918","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line","category-linux","tag-command-line","tag-dnf5","tag-linux"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/9918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9918"}],"version-history":[{"count":1,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/9918\/revisions"}],"predecessor-version":[{"id":9919,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/9918\/revisions\/9919"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/4654"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}