Here is the problem. I want to upgrade from LEAP 15.0 to 15.1.
I ran the repository refresh and system update as a start. In the past I’ve been concerned that my root system was a bit small (it’s around 24GB) and that old kernels might cause the new system to run out of disk space, so I learned to remove older kernels using zypper.
Today I noticed that my root directory was down to around 5GB and I was concerned that there might be old kernels still installed. So I checked and sure enough there are a ton of kernels listed with zypper se -s ‘kernel*’. So I decided to look up how to remove them again, both with Yast and zypper. There were so many kernels and related dependencies that I preferred not to do it with zypper, but preferably with Yast.
I looked up how to manage multiple versions of kernels with Yast. The docs say that you go to View -> Packages -> Mutliversion Packages, then check the Versions tab for the package of interest. Then to remove undesired versions you click the white box until the box gets a red check mark, and then accept and the unwanted version is removed.
Well, I click on the white box and I get a green arrow, indicating that version will be installed - and no matter how I click, there is no red check mark indicating how to uninstall that version. Unless I’m missing something I can’t remove old kernels using Yast.
So I resign myself to doing it via zypper. So I use the above search command to list the installed kernels, and I key in, for example, zypper rm kernel-default-4.12.14-lp150.11.4 - which is one of the kernels which are listed in the search output with a “v” in the status column indicating it is “another version installed”. I get the following response from zypper:
zypper rm kernel-default-4.12.14-lp150.11.4
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
Package 'kernel-default-4.12.14-lp150.11.4' not found.
Resolving package dependencies...
Nothing to do.
- It would seem the repositories are broken - except they show up fine in Yast and zypper; or 2) that for some reason it can’t find the kernel-default package which zypper itself has listed as being installed.
Here are my repos as listed by zypper:
Repository priorities in effect: (See 'zypper lr -P' for details)
90 (raised priority) : 1 repository
99 (default priority) : 17 repositories
# | Alias | Name | Enabled | GPG Check | Refresh | URI
---+-------------------------------------+-----------------------------------------+---------+-----------+---------+------------------------------------------------------------------------------------------------
1 | Kernel:stable | Kernel:stable | No | ---- | ---- | https://download.opensuse.org/repositories/Kernel:/stable/standard
2 | MEGAsync | MEGAsync | Yes | (r ) Yes | Yes | https://mega.nz/linux/MEGAsync/openSUSE_Leap_15.0/
3 | download.opensuse.org-non-oss | Main Repository (NON-OSS) | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.0/repo/non-oss/
4 | download.opensuse.org-non-oss_1 | Update Repository (Non-Oss) | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.0/non-oss/
5 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.0/repo/oss/
6 | download.opensuse.org-oss_1 | Main Update Repository | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.0/oss
7 | google-chrome | google-chrome | Yes | (r ) Yes | Yes | http://dl.google.com/linux/chrome/rpm/stable/x86_64
8 | http-download.opensuse.org-032dc754 | home:jmairboeck | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/home:/jmairboeck/openSUSE_Leap_15.0/
9 | http-download.opensuse.org-5941b6aa | X11:Unity | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/X11:/Unity/openSUSE_Leap_15.0/
10 | http-download.opensuse.org-722b7fe1 | openSUSE:Leap:15.0:Update | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.0/oss/
11 | http-download.opensuse.org-a1e8b295 | home:awissu:NonFree | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/home:/awissu:/NonFree/openSUSE_Leap_15.0/
12 | kernel-repo | kernel-repo | No | ---- | ---- | http://download.opensuse.org/repositories/Kernel:/HEAD/standard/
13 | openSUSE-Leap_15.0-1_1 | openSUSE-Leap 15.0-1 | Yes | (r ) Yes | No | iso:///?iso=openSUSE-Leap-15.0-DVD-x86_64.iso&url=dir%3A%2FData5%2FLinuxPrograms2%2FOpenSUSEISO
14 | openSUSE_Leap_15.0 | openSUSE_Leap_15.0 KDE:Applications | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/KDE:/Applications:/18.04/openSUSE_Leap_15.0/
15 | openSUSE_Leap_15.0_1 | openSUSE_Leap_15.0 KDE:Extra | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/KDE:/Extra/openSUSE_Leap_15.0/
16 | openSUSE_Leap_15.0_2 | Mozilla | Yes | (r ) Yes | Yes | http://download.opensuse.org/repositories/mozilla/openSUSE_Leap_15.0/
17 | packman | packman | Yes | (r ) Yes | Yes | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.0/
18 | repo-debug | openSUSE-Leap-15.0-Debug | No | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.0/repo/oss/
19 | repo-debug-non-oss | openSUSE-Leap-15.0-Debug-Non-Oss | No | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.0/repo/non-oss/
20 | repo-debug-update | openSUSE-Leap-15.0-Update-Debug | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.0/oss/
21 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.0/non-oss/
22 | repo-source | openSUSE-Leap-15.0-Source | Yes | (r ) Yes | Yes | http://download.opensuse.org/source/distribution/leap/15.0/repo/oss/
23 | repo-source-non-oss | openSUSE-Leap-15.0-Source-Non-Oss | Yes | (r ) Yes | Yes | http://download.opensuse.org/source/distribution/leap/15.0/repo/non-oss/
24 | teamviewer | TeamViewer - x86_64 | Yes | (r ) Yes | No | http://linux.teamviewer.com/yum/stable/main/binary-x86_64/
The reason I have kernel-repo and kernel-stable is because I was messing around with kernels back when I had an issue that I wanted to be sure that openSUSE Leap 15 could report proper temperature on my new AMD Ryzen machine last December. Apparently new kernels weren’t available for Leap 15.0, so I added kernel repositories to get later kernels. I’m not sure if that has anything to do with the current issue.
I had the following in /etc/zypp/zypp.conf:
linux-2ywh:/home/richardhack # cat /etc/zypp/zypp.conf | grep multiversion
## provides:multiversion(kernel) - all packages providing 'multiversion(kernel)'
multiversion = provides:multiversion(kernel)
## Defining directory which may contain additional multiversion definitions.
## one valid multiversion list entry per line. Empty lines and lines starting
## ------------------------- [/etc/zypp/multiversion.d/example file begin] -----------------------
## provides:multiversion(kernel)
## ------------------------- [/etc/zypp/multiversion.d/example file end] -----------------------
## Default value: {configdir}/multiversion.d
# multiversiondir = /etc/zypp/multiversion.d
## above multiversion variable is set. Packages can be specified as
## Default: Do not delete any kernels if multiversion = provides:multiversion(kernel) is set
multiversion.kernels = latest,latest-1,running, oldest
I assume the presence of “oldest” is why I had these old kernels around. I changed that to remove oldest, so now I only have latest, latest-1, and running.
I also checked the purge kernels service and it was enabled and it ran after the zypper update I did but it did not remove the really old kernels.
I also note this bug report here:
**Bug 1117086 - **Automatic cleanup of old kernels not working
https://bugzilla.opensuse.org/show_bug.cgi?id=1117086
I have these kernels installed and they are fine:
linux-2ywh:/home/richardhack # zypper se -si 'kernel*'
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+----------------------+---------+----------------------+--------+------------------
i+ | kernel-default | package | 5.2.rc7-1.1.g2d405cc | x86_64 | (System Packages)
i+ | kernel-default | package | 5.2.rc5-3.1.ga562f5a | x86_64 | (System Packages)
i+ | kernel-default-devel | package | 5.2.rc7-1.1.g2d405cc | x86_64 | (System Packages)
i+ | kernel-default-devel | package | 5.2.rc5-3.1.ga562f5a | x86_64 | (System Packages)
i+ | kernel-devel | package | 5.2.rc7-1.1.g2d405cc | noarch | (System Packages)
i+ | kernel-devel | package | 5.2.rc5-3.1.ga562f5a | noarch | (System Packages)
i+ | kernel-docs | package | 5.2.rc7-1.1.g2d405cc | noarch | (System Packages)
i+ | kernel-firmware | package | 20190618-267.1 | noarch | (System Packages)
i+ | kernel-macros | package | 5.2.rc7-1.1.g2d405cc | noarch | (System Packages)
i+ | kernel-source | package | 5.2.rc7-1.1.g2d405cc | noarch | (System Packages)
i+ | kernel-source | package | 5.2.rc5-3.1.ga562f5a | noarch | (System Packages)
i+ | kernel-syms | package | 5.2.rc7-1.1.g2d405cc | x86_64 | (System Packages)
i+ | kernel-syms | package | 5.2.rc5-3.1.ga562f5a | x86_64 | (System Packages)
But I also have all these installed according to the search command:
v | kernel-default | package | 4.12.14-lp150.12.61.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.61.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.58.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.58.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.48.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.48.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.45.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.45.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.28.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.28.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.25.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.25.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.22.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.22.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.19.2 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.19.2 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.16.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.16.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.13.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.13.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.10.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.10.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.7.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.7.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.12.4.1 | x86_64 | Main Update Repository
v | kernel-default | package | 4.12.14-lp150.12.4.1 | x86_64 | openSUSE:Leap:15.0:Update
v | kernel-default | package | 4.12.14-lp150.11.4 | x86_64 | Main Repository (OSS)
v | kernel-default | package | 4.12.14-lp150.11.4 | x86_64 | openSUSE-Leap 15.0-1
Those are the ones I’d like to get rid of. So how I can force the system to remove these old kernels I have hanging around?
Thanks in advance for any assistance.