{"id":7835,"date":"2021-02-03T19:23:07","date_gmt":"2021-02-03T16:23:07","guid":{"rendered":"https:\/\/kifarunix.com\/?p=7835"},"modified":"2024-03-19T19:57:45","modified_gmt":"2024-03-19T16:57:45","slug":"upgrade-a-single-package-on-centos-fedora","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/upgrade-a-single-package-on-centos-fedora\/","title":{"rendered":"Upgrade a Single Package on CentOS\/Fedora"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"404\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos.png\" alt=\"Upgrade a Single Package on CentOS\/Fedora\" class=\"wp-image-7853\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos.png?v=1612365803 1009w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos-768x308.png?v=1612365803 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos-150x60.png?v=1612365803 150w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos-300x120.png?v=1612365803 300w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/02\/upgrade-single-package-centos-696x279.png?v=1612365803 696w\" sizes=\"(max-width: 1009px) 100vw, 1009px\" \/><\/figure>\n\n\n\n<p>Want to upgrade a single package on CentOS\/Fedora systems?<\/p>\n\n\n\n<p>Worry not, because, CentOS\/Fedora or any other RHEL based distribution provides a way to upgrade a single package using the yum command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrading a Single Package on CentOS\/Fedora<\/h2>\n\n\n\n<p>Usually, CentOS\/Fedora or any other RHEL based distribution provides the <code><strong>yum update<\/strong><\/code> command for updating system packages.<\/p>\n\n\n\n<p>When you run the <strong><code>yum update<\/code><\/strong>, all system packages with available updates are updated.<\/p>\n\n\n\n<p>However, if you want to upgrade a single package, then you would have to pass the package name as the argument to the <strong><code>yum update<\/code><\/strong> command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><code><strong>yum update &lt;packagename&gt;<\/strong><\/code><\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><code><strong>dnf update &lt;packagename&gt;<\/strong><\/code><\/code><\/pre>\n\n\n\n<p>Replace the <strong><code>&lt;packagename&gt;<\/code><\/strong> with the name of the specific package you want to update.<\/p>\n\n\n\n<p>Similarly, you can use the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><code><strong>yum upgrade &lt;packagename&gt;<\/strong><\/code><\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><code><strong>dnf upgrade &lt;packagename&gt;<\/strong><\/code><\/code><\/pre>\n\n\n\n<p>For example, let us list all available package updates using either <strong><code>yum check-update<\/code><\/strong> or <strong><code>yum list updates<\/code><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum check-update<\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum list updates<\/code><\/pre>\n\n\n\n<p>Either of the commands will provide a list of all packages with packages available;<\/p>\n\n\n\n<p>See my truncated output below from <code>yum list updates<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nvim-common.x86_64                                                              2:8.0.1763-15.el8                                                                 AppStream  \nvim-enhanced.x86_64                                                            2:8.0.1763-15.el8                                                                 AppStream  \nvim-filesystem.noarch                                                          2:8.0.1763-15.el8                                                                 AppStream  \nvim-minimal.x86_64                                                             2:8.0.1763-15.el8                                                                 BaseOS     \nwebmin.noarch                                                                  1.970-1                                                                           Webmin     \nwget.x86_64                                                                    1.19.5-10.el8                                                                     AppStream  \nwhich.x86_64                                                                   2.21-12.el8                                                                       BaseOS     \nxfsprogs.x86_64                                                                5.0.0-4.el8                                                                       BaseOS     \nxkeyboard-config.noarch                                                        2.28-1.el8                                                                        AppStream  \nyum.noarch                                                                     4.2.23-4.el8                                                                      BaseOS     \nzlib.x86_64<\/code><\/pre>\n\n\n\n<p>Note that you can as well get the packages that needs to be upgraded using the <code><strong>yum list --upgrades<\/strong><\/code> command.<\/p>\n\n\n\n<p>Lets take for example, I want to upgrade individual package on CentOS\/Fedora like, webmin, which is one of the packages that have updates available as per out above command output, then either of the commands below get the job done.<\/p>\n\n\n\n<p>Before that, check the version of the installed package;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum list installed webmin<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Installed Packages\nwebmin.noarch         1.940-2              @Webmin                                                   <\/code><\/pre>\n\n\n\n<p>As you can see, we have Webmin version 1.940-2 installed.<\/p>\n\n\n\n<p>The available updated version is webmin v1.970-1.<\/p>\n\n\n\n<p>Thus, to upgrade a single or individual specific package on CentOS\/Fedora<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update webmin<\/code><\/pre>\n\n\n\n<p>or <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum update webmin<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf upgrade webmin<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum upgrade webmin<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Last metadata expiration check: 0:51:04 ago on Wed 03 Feb 2021 10:12:22 AM EST.\nDependencies resolved.\n============================================================================================================================================================================\n Package                                  Arch                                     Version                                   Repository                                Size\n============================================================================================================================================================================\nUpgrading:\n webmin                                   noarch                                   1.970-1                                   Webmin                                    39 M\n\nTransaction Summary\n============================================================================================================================================================================\nUpgrade  1 Package\n\nTotal download size: 39 M\nIs this ok &#91;y\/N]: y<\/code><\/pre>\n\n\n\n<p>And that is all on upgrading a single package on CentOS\/Fedora systems.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Further Reading<\/h4>\n\n\n\n<p>Read more on;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>man yum<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>man dnf<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Other tutorials<\/h4>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/upgrade-a-single-package-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Upgrade a Single package on Ubuntu<\/a><\/p>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/delete-lines-matching-specific-pattern-in-a-file-using-vim\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Delete Lines Matching Specific Pattern in a File using VIM<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to upgrade a single package on CentOS\/Fedora systems? Worry not, because, CentOS\/Fedora or any other RHEL based distribution provides a way to upgrade a<\/p>\n","protected":false},"author":3,"featured_media":7853,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,49],"tags":[3113,3108,1203,3107,3109,3110,3111,3112],"class_list":["post-7835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-command-cheatsheets","tag-update","tag-update-specific-package-centos","tag-upgrade","tag-upgrade-individual-package-centos","tag-upgrade-package-centos","tag-upgrade-single-package-centos","tag-yum-update","tag-yum-upgrade","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7835"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=7835"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7835\/revisions"}],"predecessor-version":[{"id":21945,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7835\/revisions\/21945"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/7853"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=7835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=7835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=7835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}