• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to install a specific version of rpm package using YUM

by admin

Question : How to install a specific rpm package version using yum?

Answer :

The ask here is to install a specific version of the package when multiple versions are available. By default when you do not specify a version for a package, latest version gets installed. The procedure below requires you to be logged in as root.

1. clean the yum cache directory

# yum clean all

2. To install a specific version of a package we must know the available package version in our repository. List all the version of the packages available :

# yum --showduplicate list [package_name]

For Example :

# yum --showduplicate list firefox
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Available Packages
firefox.x86_64                                                              24.5.0-1.el7                                                                RHEL7
firefox.x86_64                                                              24.6.0-1.el7_0                                                              RHEL7
firefox.x86_64                                                              24.7.0-1.el7_0                                                              RHEL7
firefox.x86_64                                                              24.8.0-1.el7_0                                                              RHEL7
firefox.x86_64                                                              31.1.0-6.el7_0                                                              RHEL7
firefox.x86_64                                                              31.2.0-3.el7_0                                                              RHEL7
firefox.x86_64                                                              31.3.0-3.el7_0                                                              RHEL7
firefox.x86_64                                                              31.4.0-1.el7_0                                                              RHEL7
firefox.x86_64                                                              31.5.0-2.el7_0                                                              RHEL7
firefox.x86_64                                                              31.5.3-3.el7_1                                                              RHEL7
firefox.x86_64                                                              31.6.0-2.el7_1                                                              RHEL7
firefox.x86_64                                                              38.0-3.el7_1                                                                RHEL7
firefox.x86_64                                                              38.0.1-1.el7_1                                                              RHEL7
.....

3. Install the specific version of the firefox package using the version number in the second column.
Syntax :

# yum install [package-name]-[version].[architecture]

For example :

# yum install firefox-31.5.3-3.el7_1.x86_64

Filed Under: Linux

Some more articles you might also be interested in …

  1. pactl: command not found
  2. Magento 2.3.3 Redis cache grows unlimited
  3. goimports Command Examples
  4. dirsearch: Web path scanner
  5. Understanding Basic File Permissions and ownership in Linux
  6. screenkey Command Examples in Linux
  7. qm snapshot Command Examples in Linux
  8. httpflow Command Examples
  9. setsebool: command not found
  10. makebuildserver Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright