Cannot undo yum update

I have done a yum update yesterday that broke my system (no graphical output in graphical-target).
So I tried to undo the update:

#yum history

ID | Command line | Date and time | Action(s) | Altered
19 | | 2022-05-17 19:12 | I, U

yum history undo 19

Last metadata expiration check: 2:06:07 ago on Mi 18 Mai 2022 09:00:57 CEST.
Error: The following problems occurred while running a transaction:
Cannot find rpm nevra “kernel-4.18.0-348.12.2.el8_5.x86_64”.
Cannot find rpm nevra “kernel-core-4.18.0-348.12.2.el8_5.x86_64”.
Cannot find rpm nevra “kernel-modules-4.18.0-348.12.2.el8_5.x86_64”.
Cannot find rpm nevra “kernel-modules-extra-4.18.0-348.12.2.el8_5.x86_64”.

What am I doing wrong?

Many thanks,

Wolfgang

First, you probably won’t need that old kernel. Alas, the yum does not seem to accept ‘–exclude’ with ‘history undo’.

Second, the kernel-4.18.0-348.* are “Rocky 8.5” content that was in different repository than the current “Rocky 8.6” content. (Mirrors have/had directories “8.5” and “8.6” – and symlink “8” that points to current version of repos.) In order for the history undo to succeed, the yum should have the old repos enabled.

Does yum repolist all have anything “old, disabled”? CentOS Linux used to define their old repos that were in vault.
My nearest mirror still seems to have content for “8.5”. You do need repo definitions similar to current enabled ones, but which point to 8.5 sources (while they still exist).

Yes, it seems I have got plnety of disabled repo’s`

type sudo yum repolist all
repo id                                                                                           repo name                                                                                                                        status
appstream                                                                                         Rocky Linux 8 - AppStream                                                                                                        enabled
appstream-debug                                                                                   Rocky Linux 8 - AppStream - Source                                                                                               disabled
appstream-source                                                                                  Rocky Linux 8 - AppStream - Source                                                                                               disabled
baseos                                                                                            Rocky Linux 8 - BaseOS                                                                                                           enabled
baseos-debug                                                                                      Rocky Linux 8 - BaseOS - Source                                                                                                  disabled
baseos-source                                                                                     Rocky Linux 8 - BaseOS - Source                                                                                                  disabled
devel                                                                                             Rocky Linux 8 - Devel WARNING! FOR BUILDROOT AND KOJI USE                                                                        disabled
epel                                                                                              Extra Packages for Enterprise Linux 8 - x86_64                                                                                   enabled
epel-debuginfo                                                                                    Extra Packages for Enterprise Linux 8 - x86_64 - Debug                                                                           disabled
epel-modular                                                                                      Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                           enabled
epel-modular-debuginfo                                                                            Extra Packages for Enterprise Linux Modular 8 - x86_64 - Debug                                                                   disabled
epel-modular-source                                                                               Extra Packages for Enterprise Linux Modular 8 - x86_64 - Source                                                                  disabled
epel-source                                                                                       Extra Packages for Enterprise Linux 8 - x86_64 - Source                                                                          disabled
epel-testing                                                                                      Extra Packages for Enterprise Linux 8 - Testing - x86_64                                                                         disabled
epel-testing-debuginfo                                                                            Extra Packages for Enterprise Linux 8 - Testing - x86_64 - Debug                                                                 disabled
epel-testing-modular                                                                              Extra Packages for Enterprise Linux Modular 8 - Testing - x86_64                                                                 disabled
epel-testing-modular-debuginfo                                                                    Extra Packages for Enterprise Linux Modular 8 - Testing - x86_64 - Debug                                                         disabled
epel-testing-modular-source                                                                       Extra Packages for Enterprise Linux Modular 8 - Testing - x86_64 - Source                                                        disabled
epel-testing-source                                                                               Extra Packages for Enterprise Linux 8 - Testing - x86_64 - Source                                                                disabled
extras                                                                                            Rocky Linux 8 - Extras                                                                                                           enabled
ha                                                                                                Rocky Linux 8 - HighAvailability                                                                                                 disabled
ha-debug                                                                                          Rocky Linux 8 - High Availability - Source                                                                                       disabled
ha-source                                                                                         Rocky Linux 8 - High Availability - Source                                                                                       disabled
media-appstream                                                                                   Rocky Linux 8 - Media - AppStream                                                                                                disabled
media-baseos                                                                                      Rocky Linux 8 - Media - BaseOS                                                                                                   disabled
nfv                                                                                               Rocky Linux 8 - NFV                                                                                                              disabled
plus                                                                                              Rocky Linux 8 - Plus                                                                                                             disabled
powertools                                                                                        Rocky Linux 8 - PowerTools                                                                                                       enabled
powertools-debug                                                                                  Rocky Linux 8 - PowerTools - Source                                                                                              disabled
powertools-source                                                                                 Rocky Linux 8 - PowerTools - Source                                                                                              disabled
resilient-storage                                                                                 Rocky Linux 8 - ResilientStorage                                                                                                 disabled
resilient-storage-debug                                                                           Rocky Linux 8 - Resilient Storage - Source                                                                                       disabled
resilient-storage-source                                                                          Rocky Linux 8 - Resilient Storage - Source                                                                                       disabled
rpmfusion-free-updates                                                                            RPM Fusion for EL 8 - Free - Updates                                                                                             enabled
rpmfusion-free-updates-debuginfo                                                                  RPM Fusion for EL 8 - Free - Updates Debug                                                                                       disabled
rpmfusion-free-updates-source                                                                     RPM Fusion for EL 8 - Free - Updates Source                                                                                      disabled
rpmfusion-free-updates-testing                                                                    RPM Fusion for EL 8 - Free - Test Updates                                                                                        disabled
rpmfusion-free-updates-testing-debuginfo                                                          RPM Fusion for EL 8 - Free - Test Updates Debug                                                                                  disabled
rpmfusion-free-updates-testing-source                                                             RPM Fusion for EL 8 - Free - Test Updates Source                                                                                 disabled
rpmfusion-nonfree-updates                                                                         RPM Fusion for EL 8 - Nonfree - Updates                                                                                          enabled
rpmfusion-nonfree-updates-debuginfo                                                               RPM Fusion for EL 8 - Nonfree - Updates Debug                                                                                    disabled
rpmfusion-nonfree-updates-source                                                                  RPM Fusion for EL 8 - Nonfree - Updates Source                                                                                   disabled
rpmfusion-nonfree-updates-testing                                                                 RPM Fusion for EL 8 - Nonfree - Test Updates                                                                                     disabled
rpmfusion-nonfree-updates-testing-debuginfo                                                       RPM Fusion for EL 8 - Nonfree - Test Updates Debug                                                                               disabled
rpmfusion-nonfree-updates-testing-source                                                          RPM Fusion for EL 8 - Nonfree - Test Updates Source                                                                              disabled
rt                                                                                              Rocky Linux 8 - Realtime                                                                                                         disabled

Yes, but none of those look like “previous version of baseos, appstream, extras, powertools”.

Kernel packages are in baseos. Do grep baseos /etc/yum.repos.d/*.repo
Look at the file that contains the [baseos] repo definition.

grep baseos /etc/yum.repos.d/*.repo
/etc/yum.repos.d/Rocky-BaseOS.repo:[baseos]
/etc/yum.repos.d/Rocky-Debuginfo.repo:[baseos-debug]
/etc/yum.repos.d/Rocky-Media.repo:[media-baseos]
/etc/yum.repos.d/Rocky-Sources.repo:[baseos-source]

A sidenote:
Apparently the problem is related to the new kernel:
If I boot into the old kernel the system comes up including grpahics.
I am on an intel-nuc. Maybe some specific driver for the grpahics card is missing?

  1. If you cat /etc/yum.repos.d/Rocky-BaseOS.repo then you see how the [baseos] is defined.
  2. RH does not remove drivers in RHEL point updates, AFAIK. Did you install something extra from third-party source to get the 8.5 working? Alternatively, which desktop manager do you use? The default: GNOME?
  3. lspci -nn lists all devices with their Device ID’s. (The ID has form [1234:5678] where 1234 and 5678 are hex numbers – first is “vendor”, second is “model”.) With the ID one can seek for drivers.