[Bug 1175678] New: complete packages --unneeded featureset (mostly "apt-mark auto")
http://bugzilla.opensuse.org/show_bug.cgi?id=1175678 Bug ID: 1175678 Summary: complete packages --unneeded featureset (mostly "apt-mark auto") Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.2 Hardware: Other OS: openSUSE Leap 15.2 Status: NEW Severity: Enhancement Priority: P5 - None Component: libzypp Assignee: zypp-maintainers@suse.de Reporter: duge@pre-sense.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- openSUSE-13.1 (zypper-1.9.*, libzypp-13.9.*) introduced some nice features: # Remove a package and it's dependencies (if unused) zypper remove --clean-deps PACKAGE # Show unused packages, which haven't been explicitly installed zypper packages --unneeded Sadly this featureset still misses some points. This can also be seen in relation to other package managers: https://wiki.archlinux.org/index.php/Pacman/Rosetta#Basic_operations Especially a counterpart to this command is missing: apt-mark auto PACKAGE # remove manually installed property # Additionally these commands would be nice. apt-mark manual PACKAGE apt-mark showmanual # show manually installed packages # But they can be workarounded. (although it's quite nasty) # apt-mark manual PACKAGE zypper install --force PACKAGE # apt-mark showmanual zypper search '' | grep -E '^i\+' Also it would be very helpfull if "zypper packages --unneeded" would work recursive. The command "zypper remove --clean-deps PACKAGE" already seems to work recursive. And Debian's "apt autoremove" also does. What I mean when saying "recursive": Currently "zypper packages --unneeded" only lists packages which are completely unneeded by other packages (and not manually installed). Let's call them package set A. But after removing set A, all packages which where required by packages in set A also become unneeded. So you have to run "zypper packages --unneeded" again. This repeats, until you finally removed only packages, that didn't had requirements to otherwise unneeded packages themselves. Related: https://bugzilla.opensuse.org/show_bug.cgi?id=1002507 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1175678 Wolf Grau <grauwolf@geekosphere.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |grauwolf@geekosphere.org -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1175678 http://bugzilla.opensuse.org/show_bug.cgi?id=1175678#c1 Hans Schwimmbeck <hans@schwimmbeck.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@schwimmbeck.de --- Comment #1 from Hans Schwimmbeck <hans@schwimmbeck.de> --- Because there is no equivalent to Debians apt autoremove in openSUSE, I made a little script which tries to mimic it and resides as zypper_autoremove in /usr/local/bin. ----------------- #!/bin/sh zypper rm -u $(zypper pa --unneeded | grep 'i |' | cut -d'|' -f3 | tr -d ' ' | uniq | tr '\n' ' ') ----------------- The command in brackets prints a list of unneeded packages separated by blanks. This list can be used by "zypper rm -u" to remove the packages recursively. It has to be run as root and should work as long as the output format of "zypper pa --unneeded" does not change. Of course it should be used with care! An "official" solution would be very much appreciated. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1175678 http://bugzilla.opensuse.org/show_bug.cgi?id=1175678#c2 kolA flash <kolAflash@kolAhilft.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kolAflash@kolAhilft.de --- Comment #2 from kolA flash <kolAflash@kolAhilft.de> --- Workaround for missing "apt mark" command equivalents, using a text editor. apt mark auto: add to /var/lib/zypp/AutoInstalled apt mark manual: remove from /var/lib/zypp/AutoInstalled -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com