How to Install Specific Version of a Package Using YUM

YUM (Yellowdog Updater Modified) holds its ground as a pivotal package manager in Red Hat-based distributions like RHEL, Fedora, CentOS, etc. It is built on top of the rpm package manager, providing an array of features that surpass the fundamentals of rpm. It simplifies package installation, handles dependencies, manages versions, and facilitates uninstallation, enhancing the user experience in Linux/Unix systems. In this guide, I will delve into how using the yum package manager you can install a specific version of an app package in Red Hat-based distributions.

Key Takeaways

  • Learning the process of installing a specific version of an app package in your system.

Requirements

  • A Red Hat-based distribution is required.
  • Sudo privilege is required.

Process Flow Chart

[Distro Used Throughout the Tutorial: RHEL 9.2]

step by step process of how to use the yum package manager to install a specific version of an app package in Red Hat-based distributions using the command line interface (CLI)

Steps to Install Specific Version of a Package Using YUM

YUM package manager is best suited to use in Red Hat-based Linux systems. Package installation is a vital part of package management. Sometimes you need to install a specific version of a package in your system. You can easily handle that task using the yum package manager in the Command Line Interface (CLI).

If you want to know how to install app packages using yum check this detailed article “How to Install RPM Packages Using YUM”. To check package installation using the yum command, check this simple article titled “How to Check if Package is Installed Using YUM”.

If you want to install a specific version of an app package in your Red Hat-based system using the yum package manager you can follow the below processes:

Steps to Follow >

➊ First, open the Terminal on your system.

➋ Next, type the following command to check all available versions of the app package in the remote repositories:

yum --showduplicate list php
EXPLANATION
  • yum: Package manager in Red Hat-based distributions.
  • showduplicate: Display duplicates (other versions) of the package in the output.
  • list: This option can show all available and installed packages in your system.
  • php: Name of the app package I want to install.

search for all available versions of the app packages in the remote repositories

➌ After that, hit ENTER. The terminal will display all available versions of the app package from the remote repositories. It will look similar to the above image.

➍ Now, if you want to install a specific version from the list from the remote repositories then run the following command:

sudo yum install php-8.0.20-3.el9.x86_64
EXPLANATION
  • sudo: Permits administrative permission.
  • install: Install an app package from the remote repository using yum.
  • php-8.0.20-3.el9.x86_64: Specific version of the app I want to install.

After executing this, the system will prompt you to enter your sudo user password, as shown in the following image. Provide your sudo password. Subsequently, the system will display your specified version of the app package, along with all the necessary dependencies.

install specific version of the app package from the remote repositories using yum

NOTE: If you do not find the specific version you are looking for in the remote repositories but you have access to the app package’s rpm file for that version then you can follow the process described in this guide “How to Install Local Package Using YUM”.

press Y to confirm automatic download and installation

➎ After that, press “Y” to confirm the installation as shown in the above image.

➏ Next, the system will automatically download and install your app package along with all of its dependencies, as illustrated in the image below:

specific version of app package installation complete

Finally, You will complete the installation of the specific version of the particular app package on your system

Conclusion

In this article, I have discussed the simplest way to install a specific version of an app package by using the yum package manager in a Red Hat-based system. I hope this article has been helpful and you were able to install the specific version of a package in your Linux system.

People Also Ask

How to install specific version using DNF?
Dnf is the most updated and efficient package manager in the Red Hat-based Linux/Unix system. To install a specific version of an app package using dnf, run this command sudo dnf install <package_name>-<version> in the terminal.
How do you upgrade a specific package using yum?
In Red Hat-based distributions yum is a very dependable package manager. You can upgrade a specific app package by executing sudo yum update <package_name> command in the terminal.
How to install yum command in Linux?
In Red Hat-based distributions yum is a very dependable package manager. If you want to install yum in Debian-based Linux distros run sudo apt install yum in the terminal. Moreover, if you want to install YUM in an Arch Linux-based distribution, execute the following command sudo pacman -S yum in the terminal.
How do I install a specific version of a program in Linux?
The command for installing a specific package version varies with the Linux distribution and package manager. The sudo apt install <package_name>=<version> is used in Debian-based Linux, sudo dnf install <package_name>-<version> is used in Red Hat-based distribution, and for Arch Linux sudo pacman -S <package_name>=<version> is used to install a specific version of an app package.
Rate this post
Ridoy Chandra Shil

Hello everyone. I am Ridoy Chandra Shil, currently working as a Linux Content Developer Executive at SOFTEKO. I am a Biomedical Engineering graduate from Bangladesh University of Engineering and Technology. I am a science and tech enthusiast. In my free time, I read articles about new tech and watch documentaries on science-related topics. I am also a big fan of “The Big Bang Theory”. Read Full Bio

Leave a Comment