• 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. CentOS / RHEL 5,6 : How to Change the timezone
  2. Linux OS Service ‘nscd’
  3. ttyrec – Record Terminal Session in Linux
  4. Understanding SELinux Policies in Linux
  5. CentOS / RHEL : How to configure a user account to never expire (disable password ageing)
  6. RHEL / CentOS : How to shrink LVM volume
  7. DNS configuration file /etc/named.conf explained
  8. How to Check Btrfs FileSystem Usage and Perform Balancing
  9. How to Map Static IP to your Domain (with GoDaddy example)
  10. How to Run DNS and FTP services in a chroot Jail

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright