Closed Yetoo1 closed 1 year ago
From DNF man page:
List packages installed on the system that are obsoleted by packages in any known repository.
I.e. it lists packages that are affected by Obsolete: *
of some other package. But when a package is retired, no other package obsoleted it. And DNF will not list it.
@xsuchy Alternatively what if the list being compared is all installed packages (some variant of dnf repoquery -q --disableplugin=local --qf "%{name}" --installed) against $UPGRADE_TO/$NEW_LIST?
Instead of just having the previous version passed into remove-retired-packages and compared the list of $UPGRADE_FROM with $UPGRADE_TO, why not just use dnf list --obsoletes and remove packages listed there. If the command does what I think it does which includes listing packages that are no longer in a repository I think this would allow removing retired packages not just from the previous version but from all versions if system was upgraded since many versions ago or remove-retired-packages wasn't run for some reason.