YUM Downgrade Packages on Fedora, CentOS, Red Hat (RHEL)
Table of Contents
This is quick tip, howto downgrade packages using YUM (example) on Fedora, CentOS, Red Hat (RHEL). This works simply with yum downgrade command and is very usefull when package(s) downgrade is needed some reason.
YUM Downgrade Basic Usage⌗
Downgrade is very straightforward when package have not any dependencies, which affect the downgrade.
YUM Downgrade Single Package⌗
yum downgrade package
Example:⌗
yum downgrade hunspell-mr.noarch
Setting up Downgrade Process
Resolving Dependencies
--> Running transaction check
---> Package hunspell-mr.noarch 0:20060920-5.fc13 set to be downgraded
---> Package hunspell-mr.noarch 0:20060920-6.fc14 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Downgrading:
hunspell-mr noarch 20060920-5.fc13 fedora 62 k
Transaction Summary
================================================================================
Downgrade 1 Package(s)
Total download size: 62 k
Is this ok [y/N]: y
Downloading Packages:
hunspell-mr-20060920-5.fc13.noarch.rpm | 62 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : hunspell-mr-20060920-5.fc13.noarch 1/2
Cleanup : hunspell-mr-20060920-6.fc14.noarch 2/2
Removed:
hunspell-mr.noarch 0:20060920-6.fc14
Installed:
hunspell-mr.noarch 0:20060920-5.fc13
Complete!
YUM Downgrade Package Which Have Dependencies⌗
YUM downgrade is more difficult with packages that have dependencies. YUM downgrade does not resolve dependencies automatically, so it must be done manually.
YUM Downgrade Package and Dependencies⌗
yum downgrade lib1 lib2 package
Example: check package dependencies manually⌗
yum downgrade sqlite
Setting up Downgrade Process
Resolving Dependencies
--> Running transaction check
---> Package sqlite.i686 0:3.6.22-1.fc13 set to be downgraded
---> Package sqlite.i686 0:3.6.23-1.fc14 set to be erased
--> Finished Dependency Resolution
Error: Package: sqlite-devel-3.6.23-1.fc14.i686 (@rawhide/12)
Requires: sqlite = 3.6.23-1.fc14
Removing: sqlite-3.6.23-1.fc14.i686 (@rawhide/12)
sqlite = 3.6.23-1.fc14
Downgraded By: sqlite-3.6.22-1.fc13.i686 (fedora)
sqlite = 3.6.22-1.fc13
You could try using --skip-broken to work around the problem
SQLite package depends on sqlite-devel package, so both (sqlite-devel and sqlite) have to be downgraded:⌗
yum downgrade sqlite-devel sqlite
Setting up Downgrade Process
Resolving Dependencies
--> Running transaction check
---> Package sqlite.i686 0:3.6.22-1.fc13 set to be downgraded
---> Package sqlite.i686 0:3.6.23-1.fc14 set to be erased
---> Package sqlite-devel.i686 0:3.6.22-1.fc13 set to be downgraded
---> Package sqlite-devel.i686 0:3.6.23-1.fc14 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Downgrading:
sqlite i686 3.6.22-1.fc13 fedora 309 k
sqlite-devel i686 3.6.22-1.fc13 fedora 80 k
Transaction Summary
================================================================================
Downgrade 2 Package(s)
Total download size: 389 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): sqlite-3.6.22-1.fc13.i686.rpm | 309 kB 00:00
(2/2): sqlite-devel-3.6.22-1.fc13.i686.rpm | 80 kB 00:00
--------------------------------------------------------------------------------
Total 438 kB/s | 389 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : sqlite-3.6.22-1.fc13.i686 1/4
Installing : sqlite-devel-3.6.22-1.fc13.i686 2/4
Cleanup : sqlite-devel-3.6.23-1.fc14.i686 3/4
Cleanup : sqlite-3.6.23-1.fc14.i686 4/4
Removed:
sqlite.i686 0:3.6.23-1.fc14 sqlite-devel.i686 0:3.6.23-1.fc14
Installed:
sqlite.i686 0:3.6.22-1.fc13 sqlite-devel.i686 0:3.6.22-1.fc13
Complete!