On a freshly installed Gentoo 2.13 system, I ran these commands to install my first package: $ cat /etc/gentoo-release Gentoo Base System release 2.13 $ sudo emaint -a sync $ sudo emerge app-editors/emacs Then I immediately tried to uninstall the same package, and it failed. That seems unexpected. Perhaps it's a bug? $ sudo emerge -cav app-editors/emacs Calculating dependencies... done! app-editors/emacs-29.1-r1 pulled in by: app-emacs/emacs-common-1.9 requires >=app-editors/emacs-23.1:* >>> No packages selected for removal by depclean
First, try: # emerge --deselect app-editors/emacs then: # emerge -cav app-editors/emacs
Thanks for the suggestion. Here is what happened: $ sudo emerge --deselect app-editors/emacs Password: >>> Removing app-editors/emacs from "world" favorites file... $ sudo emerge -cav app-editors/emacs Calculating dependencies... done! app-editors/emacs-29.1-r1 pulled in by: app-emacs/emacs-common-1.9 requires >=app-editors/emacs-23.1:* >>> No packages selected for removal by depclean $
(In reply to dbarrett from comment #2) > Thanks for the suggestion. Here is what happened: > > $ sudo emerge --deselect app-editors/emacs > Password: > >>> Removing app-editors/emacs from "world" favorites file... > $ sudo emerge -cav app-editors/emacs > > Calculating dependencies... done! > app-editors/emacs-29.1-r1 pulled in by: > app-emacs/emacs-common-1.9 requires >=app-editors/emacs-23.1:* > > >>> No packages selected for removal by depclean > $ You need to do the same for emacs-common: $ sudo emerge --deselect app-editors/emacs app-emacs/emacs-common (no need to supply the package you want to remove, emerge will take care of that) $ sudo emerge -cav
Thank you. So if I install a package (like app-editors/emacs), and it pulls in dependencies (like app-emacs/emacs-common), the only way to uninstall the package is to list all dependencies by name on the command line? If emacs had pulled in 30 dependencies, all 30 of them would need to be listed explicitly on the --deselect line?
(In reply to dbarrett from comment #4) > Thank you. So if I install a package (like app-editors/emacs), and it pulls > in dependencies (like app-emacs/emacs-common), the only way to uninstall the > package is to list all dependencies by name on the command line? > > If emacs had pulled in 30 dependencies, all 30 of them would need to be > listed explicitly on the --deselect line? you can after deinstalling emacs run emerge --depclean
Thank you Joakim, but that's not quite what I am asking. In my original example, app-editors/emacs had one dependency (app-emacs/emacs-common) that was blocking its removal. The solution was to --deselect it manually. But what if app-editors/emacs had 30 dependencies that are blocking its removal, instead of just app-emacs/emacs-common? Would all 30 dependencies need to be named on the command line, like I did with app-emacs/emacs-common? Or is there a magic command that means, "Please remove emacs along with all 30 dependencies that are blocking its removal"? Thank you.
(In reply to dbarrett from comment #6) > Thank you Joakim, but that's not quite what I am asking. > > In my original example, app-editors/emacs had one dependency > (app-emacs/emacs-common) that was blocking its removal. The solution was to > --deselect it manually. But what if app-editors/emacs had 30 dependencies > that are blocking its removal, instead of just app-emacs/emacs-common? Would > all 30 dependencies need to be named on the command line, like I did with > app-emacs/emacs-common? Or is there a magic command that means, "Please > remove emacs along with all 30 dependencies that are blocking its removal"? > Thank you. You're right, yes. For now, you have two choices: 1) emerge --depclean (global depclean, you should do this regularly after world upgrades anyway) 2) emerge --depclean a b ... (for each explicit dependency you think could be removed) But you are right that we need some command for this recursive removal, see bug 416907. *** This bug has been marked as a duplicate of bug 416907 ***