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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. slocate command in linux
  2. ntpdate Command Examples in Linux
  3. Understanding Linux SCSI Reservation
  4. Creating and Removing Files and Directories Under Linux
  5. fcrackzip: command not found
  6. Configuring Remote Logging using rsyslog in CentOS/RHEL
  7. kill Command Examples in Linux
  8. netselect Command Examples in Linux
  9. Configure VSFTPD Chroot Environment in CentOS and RHEL
  10. “Failed to Synchronize Cache For Repo ‘repo_name’, Ignoring This Repo” – CentOS/RHEL 8 error

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright