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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. CentOS / RHEL 7 : Beginners guide to systemd targets (replacement of SysV init run levels)
  2. How to enable IPv6 on CentOS / RHEL 7
  3. Red Hat / CentOS : How to create interface / NIC bonding
  4. Understanding /etc/xinetd.conf file in Linux
  5. CentOS / RHEL 5 : How to Configure kdump
  6. “passwd: Module is unknown” – error while changing the password in CentOS/RHEL 6
  7. Change default kernel (boot with old kernel) in CentOS/RHEL/OEL 5 and 6
  8. 5 Useful Examples of firewall-cmd command
  9. How to Extend allowed number of loopback devices
  10. Audit Rule Configuration not Reflected – How to troubleshoot

You May Also Like

Primary Sidebar

Recent Posts

  • Failed to start LSB: Bring up/down networking – On restarting network service CentOS/RHEL (DHCP client)
  • How To Add Timestamps To dmesg Kernel Boot Log in CentOS/RHEL
  • How to disable ICMP redirects on CentOS/RHEL
  • What are Oracle Key Vault Roles
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary