• 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

Downgrading an rpm package to a lower version (using “rpm” command)

by admin

Question: How to downgrade an rpm package in CentOS/RHEL 6 system to a lower version using the “rpm” command?

Its not really recommended to use rpm command instead of yum to downgrade an rpm package. But in case if you don’t have a choice use the below procedure.

Pre-requisites

Make sure you have downloaded all the packages and its dependencies for the lower version.

Downgrading rpm version

For the purpose of this post we are downgrading the systemd packages from systemd-219-67.0.1.el7_7.2 to systemd-219-62.0.4.el7_6.9.

1. Download the lower version of a package and its dependency. In our case, we have downlaowded all the required dependent packages as shown below.

[root@geeklab /]# ls
libgudev1-219-62.0.4.el7_6.9.x86_64.rpm systemd-python-219-62.0.4.el7_6.9.x86_64.rpm
systemd-219-62.0.4.el7_6.9.x86_64.rpm systemd-sysv-219-62.0.4.el7_6.9.x86_64.rpm
systemd-libs-219-62.0.4.el7_6.9.x86_64.rpm

They are all depended lower version of systemd packages.

2. To downgarde the rpm package, use the below commadn syntax.

# rpm -Uvh --oldpackage [downloaded_lower_version_package]

For example:

[root@geeklab /]# rpm -Uvh --oldpackage *.rpm
Preparing... ################################# [100%]
Updating / installing...
1:systemd-libs-219-62.0.4.el7_6.9 ################################# [ 10%]
2:systemd-219-62.0.4.el7_6.9 ################################# [ 20%]
3:systemd-python-219-62.0.4.el7_6.9################################# [ 30%]
4:systemd-sysv-219-62.0.4.el7_6.9 ################################# [ 40%]
5:libgudev1-219-62.0.4.el7_6.9 ################################# [ 50%]
Cleaning up / removing...
6:systemd-python-219-67.0.1.el7_7.2################################# [ 60%]
7:systemd-sysv-219-67.0.1.el7_7.2 ################################# [ 70%]
8:systemd-219-67.0.1.el7_7.2 ################################# [ 80%]
9:libgudev1-219-67.0.1.el7_7.2 ################################# [ 90%]
10:systemd-libs-219-67.0.1.el7_7.2 ################################# [100%]

We have successfully downgraded the systemd packages from version systemd-219-67.0.1.el7_7.2 to systemd-219-62.0.4.el7_6.9.

Filed Under: CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. How to uninstall chromium-chromedriver from Ubuntu
  2. CentOS / RHEL 7 : systemctl replacements of legacy commands service and chkconfig
  3. Using cut on Linux Terminal
  4. iw: command not found
  5. How to recover deleted Logical volume (LV) in LVM using vgcfgrestore
  6. dm-tool: command not found
  7. What are SELinux Users and how to Map Linux Users to SELinux Users
  8. ‘ip’ Command cheat sheet (Command Line Reference)
  9. How to change a system’s machine-ID in Oracle Enterprise Linux 7
  10. lastcomm Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright