I'm trying to remove an old kernel from openSUSE. The openSUSE version is Tumbleweed (20191128), and the old kernel is 5.1.16.
The manpage for Zypper is here. It looks like Zypper supports wildcards (if I am parsing the manpage correctly), but I am not getting the syntax correct. I am not sure how to tell the package manager to match the wildcard during the remove.
How do I tell Zypper to remove packages matching *5.1.16*
?
> ls /boot/
boot.readme sysctl.conf-5.1.16-1-default
config-5.1.16-1-default sysctl.conf-5.3.12-1-default
config-5.3.12-1-default System.map-5.1.16-1-default
grub2 System.map-5.3.12-1-default
initrd vmlinux-5.1.16-1-default.gz
initrd-5.1.16-1-default vmlinux-5.3.12-1-default.gz
initrd-5.3.12-1-default vmlinuz
symvers-5.1.16-1-default.gz vmlinuz-5.1.16-1-default
symvers-5.3.12-1-default.gz vmlinuz-5.3.12-1-default
> sudo zypper remove *5.1.16*
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
'*5.1.16*' not found in package names. Trying capabilities.
No provider of '*5.1.16*' found.
Resolving package dependencies...
Nothing to do.
> sudo zypper remove '*5.1.16*'
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
'*5.1.16*' not found in package names. Trying capabilities.
No provider of '*5.1.16*' found.
Resolving package dependencies...
Nothing to do.