openSUSE / zypper

World's most powerful command line package manager
http://en.opensuse.org/Portal:Zypper
Other
405 stars 110 forks source link

Upgrades should also support --clean-deps #443

Open aaronpuchert opened 2 years ago

aaronpuchert commented 2 years ago

Just like removing a package, updating a package can also let dependencies go unneeded. So it would be nice if we could allow dup --clean-deps with a similar behavior to remove --clean-deps, i.e. remove all packages that were needed by the earlier version but are now unused.

There could also be a flag in zypp.conf: we probably shouldn't reuse solver.cleandepsOnRemove since it refers to removal, but we could have solver.cleandepsOnUpgrade or similar to solver.upgradeRemoveDroppedPackages it could be called solver.upgradeRemoveUnneededPackages.

This can be seen as automatic alternative to #116 , and is probably most comfortable to use after #89 has been implemented.