While following https://access.redhat.com/solutions/64069 General documentation of the system state both prior to and after patching is always good practice. This should include running package-cleanup with following flags, --orphans, --problems, --dupes, --leaves.
Looking for orphans (packages which are not available from currently configured repositories) I did get
kernel-3.10.0-1127.el7.x86_64 and it would be true, because I've installed CentOS 7.8 and upgraded to 7.9 and the kernel package is in the https://vault.centos.org/7.8.2003/os/Source/SPackages/ repo not the 7.9.
[root@localhost boot]# package-cleanup --orphans Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.wielun.net * extras: centos.wielun.net * updates: centos.wielun.net kernel-3.10.0-1127.el7.x86_64 [root@localhost boot]# rpm -qa kernel kernel-3.10.0-1160.6.1.el7.x86_64 kernel-3.10.0-1127.el7.x86_64
I can imagine that it would be advisable to run the above command in case I would like to use
yum history undo to revert last made changes, and that a given
rpm package would have to be available on the system, but if it was not removed during
yum update then do I need really to care if the package is marked as
Next, I executed the following command, to get a list of leaves ( Leaf nodes are RPMs that are not relied upon by any other RPM):
[root@localhost boot]# package-cleanup --leaves Loaded plugins: fastestmirror libsysfs-2.1.0-16.el7.x86_64 [root@localhost boot]# rpm -q --requires libsysfs-2.1.0-16.el7.x86_64 /sbin/ldconfig /sbin/ldconfig libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rtld(GNU_HASH) rpmlib(PayloadIsXz) <= 5.2-1 [root@localhost boot]# rpm -q --provides libsysfs-2.1.0-16.el7.x86_64 libsysfs = 2.1.0-16.el7 libsysfs(x86-64) = 2.1.0-16.el7 libsysfs.so.2()(64bit)
I've checked with
rpm -q --provides what capabilities are provided with the
libsysfs-2.1.0-16.el7.x86_64 package and it listed 3 items.
When I run now
yum remove libsysfs-2.1.0-16.el7.x86_64 I get the following:
[root@localhost boot]# yum remove libsysfs-2.1.0-16.el7.x86_64 Loaded plugins: changelog, fastestmirror Resolving Dependencies --> Running transaction check ---> Package libsysfs.x86_64 0:2.1.0-16.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================================= Removing: libsysfs x86_64 2.1.0-16.el7 @anaconda 146 k Transaction Summary ============================================================================================================================================================================================= Remove 1 Package
Per my understanding yum resolved all the dependencies and it looks like I'm free to remove the pacakage, but I'm wondering about the output of the
rpm -q --provides command. Is it correct to say that the 3 items listed is stuff that got installed together with the
libsysfs.x86_64 0:2.1.0-16.el7 package AND since yum resolved all dependencies and no other stuff on the system requires this package + the packages/shared libraries it provides it can be removed without any issues ?
If that is true, why I'm not able to list the files installed as part of that rpm ?
[root@localhost boot]# rpm -qa libsysfs libsysfs-2.1.0-16.el7.x86_64 [root@localhost boot]# [root@localhost boot]# [root@localhost boot]# rpm -qlp libsysfs-2.1.0-16.el7.x86_64 error: open of libsysfs-2.1.0-16.el7.x86_64 failed: No such file or directory
Thank you for any clarification is possible !