• 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 Force User/Group Ownership Of Files On A Samba Share
  2. How to Stop/disable Firewalld on CentOS/RHEL 8
  3. How to Disable TLS 1.1 Cockpit port 9090
  4. How to Control user access to Virtual Machine in RedHat Virtualization
  5. How to enable SFTP Logging without chroot in CentOS/RHEL
  6. lvremove Command Examples in Linux
  7. How to Configure Proxy in CentOS/RHEL/Fedora
  8. What are DNS Nameserver Types in Linux
  9. wget Command Examples in Linux
  10. CentOS / RHEL : How to allow or deny Users to login to VSFTP Server

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