Summary: | sys-apps/portage: emerge option to remove package and its dependencies (equivalent to emerge --deselect <packages> && emerge --depclean, but only remove specified <packages> and their dependencies which are no longer needed) | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Phil Stracchino (Unix Ronin) <phils> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | enhancement | CC: | dbarrett, esigra, gerion.entrup, kingjon3377, roothorick, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=787755 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 155723 |
Description
Phil Stracchino (Unix Ronin)
2012-05-21 13:00:05 UTC
I see the point, iff your system is not completely up to date (emerge -avuND world ; emerge -a --depclean ; revdep-rebuild --ignore -- av ). In all other cases emerge -a --deselect <atom> emerge -a --depclean should do the trick. Actually, the use case I have in mind is less "not fully up-to-date system" than the case of a system with some packages locally built from source (or installed from non-Gentoo packages) outside of portage, but for which dependencies were installed from portage. emerge --depclean sees those as orphan packages, because it doesn't know they're dependencies for something installed outside portage. So then, if I remove a Gentoo package I'm no longer using, I may want to remove its orphaned dependencies, but *only* its orphaned dependencies, without scanning the entire system for installed packages that have no listed dependencies within portage. My system, for example, has a lengthy list of Perl packages installed for either my own code or for non-Gentoo Perl programs, which it wants to remove on a depclean. So what I wind up doing is running emerge --depclean -p, then selecting out of that list the packages I know I'm not using and removing them with emerge -C. (In reply to comment #2) > My system, for example, has a lengthy list of Perl packages installed for > either my own code or for non-Gentoo Perl programs, which it wants to remove > on a depclean. So what I wind up doing is running emerge --depclean -p, > then selecting out of that list the packages I know I'm not using and > removing them with emerge -C. You should do one of the following: 1) Add the wanted packages to your world file with `emerge --noreplace atom`. 2) Create an ebuild (in an overlay) that does nothing more that pull in the wanted packages in RDEPEND, install it, and add it to your world file. Actually, my game plan is to make proper ebuilds for the leaf-node applications... I was just about to file my own bug requesting the same when I found this one :) Using --depclean isn't that easy in all cases as it requires the tree be in sync with your installed pkgs which isn't always easy to do. An embedded system may not have the space needed to first emerge all new pkgs the cleanout old stuff. *** This bug has been marked as a duplicate of bug 591960 *** *** Bug 591960 has been marked as a duplicate of this bug. *** *** Bug 336889 has been marked as a duplicate of this bug. *** *** Bug 915149 has been marked as a duplicate of this bug. *** |