PDA

View Full Version : Finding obsolete packages



boycottsystemd
1st December 2017, 11:38 AM
After upgrade to Fedora 26:

dnf info bbswitch

Name : bbswitch
Version : 0.8.0
Revision : 1.fc22
Architecture : x86_64
Size : 24 k
Source : bbswitch-0.8.0-1.fc22.src.rpm


Should

dnf check --obsoletes

find all such obsolete packages ?

PabloTwo
1st December 2017, 04:39 PM
You are misunderstanding just what an "obsolete" package is. Just because an rpm package is tagged with an earlier fedora release than is currently installed does not automatically make it obsolete. An obsolete package is one that has been declared as obsolete by a newer package, usually when the newer package is renamed to something else, and possibly also because the newer package has been split up into multiple packages.

$ uname -r
4.13.15-200.fc26.x86_64

$ rpm -qa | egrep "fc22|fc23|fc24|fc25"
geoclue-0.12.99-8.fc23.x86_64
ORBit2-2.14.19-15.fc24.x86_64
system-config-date-1.10.9-2.fc24.noarch
libsilc-1.1.10-14.fc23.x86_64
python-pyblock-0.53-8.fc22.x86_64
fakehal-0.5.14-8.fc23.x86_64
libmowgli-1.0.0-10.fc24.x86_64
pam_pkcs11-0.6.8-8.fc24.x86_64
vte-0.28.2-18.fc25.x86_64
xorg-x11-xauth-1.0.9-5.fc24.x86_64
farstream-0.1.2-13.fc25.x86_64
clucene09-core-0.9.21b-16.fc24.x86_64
pm-utils-1.4.1-31.fc22.x86_64
hawkey-0.6.4-3.fc25.x86_64
eekboard-libs-1.0.8-10.fc24.x86_64
eekboard-service-1.0.8-10.fc24.x86_64
gtkmathview-0.8.0-19.fc23.x86_64
compat-gnutls28-3.3.21-1.fc24.x86_64
compat-nettle27-2.7.1-2.fc23.x86_64
What you are seeing is an "orphaned" bbswitch package, which is not the same as "obsolete".

srakitnican
1st December 2017, 06:21 PM
On a fully updated system, you can use `dnf -q repoquery --extras` to get a list of packages that are installed but not present in any of enabled repositories. Then you should be able to narrow this list pretty well to get what you need. You can further add something like ` --qf="%{name}.%{arch}"` to this command to format the output to pass to `dnf remove` for example.

boycottsystemd
2nd December 2017, 06:55 PM
You are misunderstanding just what an "obsolete" package is. Just because an rpm package is tagged with an earlier fedora release than is currently installed does not automatically make it obsolete. An obsolete package is one that has been declared as obsolete by a newer package, usually when the newer package is renamed to something else, and possibly also because the newer package has been split up into multiple packages.

$ uname -r
4.13.15-200.fc26.x86_64

$ rpm -qa | egrep "fc22|fc23|fc24|fc25"
geoclue-0.12.99-8.fc23.x86_64
ORBit2-2.14.19-15.fc24.x86_64
system-config-date-1.10.9-2.fc24.noarch
libsilc-1.1.10-14.fc23.x86_64
python-pyblock-0.53-8.fc22.x86_64
fakehal-0.5.14-8.fc23.x86_64
libmowgli-1.0.0-10.fc24.x86_64
pam_pkcs11-0.6.8-8.fc24.x86_64
vte-0.28.2-18.fc25.x86_64
xorg-x11-xauth-1.0.9-5.fc24.x86_64
farstream-0.1.2-13.fc25.x86_64
clucene09-core-0.9.21b-16.fc24.x86_64
pm-utils-1.4.1-31.fc22.x86_64
hawkey-0.6.4-3.fc25.x86_64
eekboard-libs-1.0.8-10.fc24.x86_64
eekboard-service-1.0.8-10.fc24.x86_64
gtkmathview-0.8.0-19.fc23.x86_64
compat-gnutls28-3.3.21-1.fc24.x86_64
compat-nettle27-2.7.1-2.fc23.x86_64
What you are seeing is an "orphaned" bbswitch package, which is not the same as "obsolete".

Newer version of bbswitch was available when bbswitch-0.8.0-1.fc22 was installed.