How to downgrade packages on CentOS

Not all program updates go well. There will be occasions when a program update may have lead to an unstable system due to hardware compatibility issues. For this or whatever the reason, if you want your previous version program back, you need to know how to downgrade the applications.

During this article, we are going to cover how to downgrade an already installed package or an application on CentOS. Previously we have shown you how to downgrade a program on Ubuntu click here to check the tutorial.

Downgrading applications and packages on CentOS

There are three methods which will help you in downgrading a package on CentOS:

  1. Downgrade using rpm command.
  2. Downgrade using yum command.
  3. Downgrade using yum history command.

For this tutorial, we will be using the firefox package to perform the downgrade process. It’s highly recommended to be careful while using the below commands.

First Method: Downgrade Using rpm Command

Step 1. Check the currently installed Firefox version.

firefox --version

Firefox version
Firefox version

Also, you can use the next command to get the firefox version.

rpm -qa | grep firefox

Firefox version using rpm command
Firefox version using rpm command

Step 2. Next, you can download the firefox rpm package from your browser, but be careful not to download from untrusted sources.

Step 3. After downloading the rpm package, use the next command to downgrade Firefox.

rpm -Uvh --oldpackage Downloads/firefox-60.5.0-2.el7.centos.x86_64.rpm

Downgrade Firefox Using rpm Command
Downgrade Firefox Using rpm Command

Step 4. Check the current Firefox version after downgrading.

rpm -qa | grep firefox

Check Firefox Version After Downgrading Using rpm Command
Check Firefox Version After Downgrading Using rpm Command

Second Method: Downgrade Using yum Command

Step 1. List all the current firefox packages from the yum cache.

yum --showduplicates list firefox

List available Firefox packages After Downgrading Using rpm Command
List available Firefox packages After Downgrading Using rpm Command

Step 2. Downgrade firefox using yum command.

sudo yum downgrade firefox

Downgrade Firefox Using yum Command
Downgrade Firefox Using yum Command

Now the yum command will first download the old firefox package.

Downloading Firefox Package
Downloading Firefox Package

After downloading the package successfully, you will get an output like the below screenshot:

After Downloading Firefox Package Using yum Command
After Downloading Firefox Package Using yum Command

Step 3. Now you can check the firefox version.

rpm -qa | grep firefox

Check Firefox Version After Downgrading Using yum Command
Check Firefox Version After Downgrading Using yum Command

Third Method: Downgrade Using yum history Command

This method depends on listing the yum command history, which means containing all the yum commands that are used. Then rollback the changes that have been done to a specific command from the history.

So to better understand this method we will need first to update Firefox (In your case you need to downgrade so skip this step and start from step 3).

Step 1. Update the firefox package using the next command.

sudo yum update firefox

Update Firefox
Update Firefox

After the firefox updates successfully the output will look like the below screenshot:

Firefox Updated Successfully
Firefox Updated Successfully

Step 2. Check the firefox version after updating.

rpm -qa | grep firefox

Check Firefox Version After Updating
Check Firefox Version After Updating

Step 3. List all the yum command history alongside with their ID.

sudo yum history

List yum Command History
List yum Command History

As you can see from the previous screenshot that there is an Update action with ID 5, next, we will use the ID of this transaction to get more information about it.

Step 4. Get more information for a specific yum transaction.

sudo yum history info 5

Get More Information For A Specific yum Transaction
Get More Information For A Specific yum Transaction

Step 5. Now in case you need to rollback to ID number 5, then use the following command.

sudo yum history undo 5

Rollback To A Certain yum Transaction
Rollback To A Certain yum Transaction

Step 6. Finally, you can check the current firefox package version.

rpm -qa | grep firefox

Check Firefox Version After Downgrading Using yum history Command
Check Firefox Version After Downgrading Using yum history Command

Congratulations, you just have learned how to downgrade an already installed centos package in many ways, you can choose the best method which suits you well.

Hend Adel
Hi! I'm Hend Adel, a freelancer technical geek with successful experience in Database, Linux and many other IT fields. I help to build solutions to suit business needs and creating streamlined processes. I love Linux and I'm here to share my skills via FOSS Linux! Thanks for reading my article.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,538FansLike
365FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

How to install CouchPotato on Ubuntu

Downloading movies and copying them over to your home server can get frustrating, especially if you are doing it daily! What if you have an option to download videos automatically, quickly, and above all with excellent quality. CouchPotato allows you to download movies easily once they are available and released automatically.

Top 20 Rsync Examples in Linux

The Rsync (remote sync) command is a Linux/Unix utility used to synchronize and copy files and directories either locally or remotely. Most Linux geeks use Rsync to mirror, backup or migrate data across folders, across disks and networks. One notable feature with the Rsync command is that it uses the "delta transfer algorithm."

Setting up NFS Server on Ubuntu Server

We have put together a detailed step-by-step tutorial that will guide you on how to install and set up NFS Server on Ubuntu so you too can start sharing data with other client systems. It is divided into sections, the first part discussing how to set up the host server and the second part showing you how to set up the client-side. For this tutorial, we will be using Ubuntu 20.04 LTS.

Crontab in Linux Explained With Examples

Crontab is the Linux equivalent of the Window's Task Scheduler. It can help you set up a task to run automatically at a regular...

The 10 Best Linux Server Distros For Home And Businesses

By the year 2020, it is estimated that there are close to 600 Linux distributions in the market. It includes both servers and Desktop versions; therefore, if you are looking for lightweight Linux distribution for your old PC or a reliable desktop version for employees in your organization, you may be overwhelmed with the number of choices for finding one for your use.

How to list the installed Packages on Ubuntu

It is only natural to start installing more and more software on your Ubuntu PC once you start using it. Similarly, it is also natural to lose track of the different packages that you have installed on your system. Eventually, you may be overwhelmed with the number of packages in your system and with the ones you hardly used.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

Beaker Browser: A P2P web browser you must try

I think we can all agree on the fact that the web browser is an integral part of our Linux systems, or any computer system, for that matter. We have had several fulfilling options for browsing the web, like Firefox, Brave, Vivaldi, Tor, etc. and they have worked pretty well, but also pretty much in the same way, except for Tor, which is much better for anonymity.

6 Essential Command-Line Utilities Every Linux User Should Know

Last week, we shared with you several "cool and fun" commands to get comfortable and confident with the Linux command-line. In our quest to further aid Linux users with mastery of the command line, or CLI, we present you with a variety of command-line utilities essential for all Linux users, regardless of proficiency level.

5 ways to send emails using the command-line in Linux

Did you master using the command-line in Linux? There is no limit to what one can do via the Linux Terminal. One of such things we are going to discuss today are methods of sending an email using the command-line.

Installing an updatable Manjaro Linux on a USB Flash Drive

In this tutorial, we will show step by step how to install a Manjaro on a USB flash. For those new to this distro, it is a light-weight distro that is based on Arch Linux. Arch Linux is known for its simplistic approach and is typically made for Linux pros, but Manjaro bridges the gap between user-friendliness and rock-solid performance.