On Sat, 2021-08-21 at 20:24 +0200, Leon Fauster via CentOS wrote:
https://linuxconfig.org/how-to-remove-orphaned-packages-on-centos-linux
It worked for me:
Get a list of orphaned packages:
$ package-cleanup --leaves
Remove them:
# yum remove `package-cleanup --leaves`
That's only if you're OK removing all of them.
Not sure why but at least on two C8S systems (not all) the kernel rpms are listed as leaves, also the running one. So, better don't execute the above command ...
Investigating why other C8S systems do not show the kernel rpms ...
I'm on C8S, and my package-cleanup --leaves is now clear.