Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
Q&A What does `emerge --update --newuse --deep @world` have to do with package removal?

In Debian-based distributions, one can update the system with apt upgrade and cleanup unused dependencies with apt autoremove. Period. On Gentoo that is apparently not as straightforward. From G...

0 answers  ·  posted 3y ago by Quasímodo‭  ·  last activity 1y ago by Mithical‭

#2: Post edited by user avatar Quasímodo‭ · 2021-08-03T17:11:08Z (over 3 years ago)
Mention manual page; Add tag.
  • In Debian-based distributions, one can update the system with `apt upgrade` and
  • cleanup unused dependencies with `apt autoremove`. Period.
  • On Gentoo that is apparently not as straightforward. From
  • [Gentoo Cheat Sheet: Package removal][1]:
  • > The recommended way to remove a package is by using `emerge --deselect`. This
  • > removes the specified package from the @world set (i.e. says the package is no
  • > longer wanted). To clean up the system afterwards, run depclean as given below.
  • >
  • > emerge --ask --depclean
  • >
  • > As a safety measure, depclean will not remove any packages unless all
  • > required dependencies have been resolved. As a consequence of this, it often
  • > becomes necessary to run:
  • >
  • > emerge --ask --verbose --update --newuse --deep @world
  • I understand `emerge --deselect` and `emerge --depclean`; Together they work
  • as `apt remove --autoremove`.
  • I do not understand the last paragraph though. What does "depclean will not remove any
  • packages unless all required dependencies have been resolved" mean exactly?
  • Surely enough depclean won't remove dependencies currently in use. Why is it
  • necessary to run the *update* command then? What does it have to do with
  • package *removal*?
  • [1]: https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet#Package_removal
  • In Debian-based distributions, one can update the system with `apt upgrade` and
  • cleanup unused dependencies with `apt autoremove`. Period.
  • On Gentoo that is apparently not as straightforward. From
  • [Gentoo Cheat Sheet: Package removal][1]:
  • > The recommended way to remove a package is by using `emerge --deselect`. This
  • > removes the specified package from the @world set (i.e. says the package is no
  • > longer wanted). To clean up the system afterwards, run depclean as given below.
  • >
  • > emerge --ask --depclean
  • >
  • > As a safety measure, depclean will not remove any packages unless all
  • > required dependencies have been resolved. As a consequence of this, it often
  • > becomes necessary to run:
  • >
  • > emerge --ask --verbose --update --newuse --deep @world
  • I understand `emerge --deselect` and `emerge --depclean`; Together they work
  • as `apt remove --autoremove`.
  • I do not understand the last paragraph though. What does "depclean will not remove any
  • packages unless all required dependencies have been resolved" mean exactly?
  • Surely enough depclean won't remove dependencies currently in use. Why is it
  • necessary to run the *update* command then? What does it have to do with
  • package *removal*?
  • The [Emerge manual][2] was not of much enlightening here; It actually employs the very same wording.
  • [1]: https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet#Package_removal
  • [2]: https://dev.gentoo.org/~zmedico/portage/doc/man/emerge.1.html
#1: Initial revision by user avatar Quasímodo‭ · 2021-08-03T11:55:47Z (over 3 years ago)
What does `emerge --update --newuse --deep @world` have to do with package removal?
In Debian-based distributions, one can update the system with `apt upgrade` and 
cleanup unused dependencies with `apt autoremove`. Period.

On Gentoo that is apparently not as straightforward. From 
[Gentoo Cheat Sheet: Package removal][1]:

> The recommended way to remove a package is by using `emerge --deselect`. This
> removes the specified package from the @world set (i.e. says the package is no
> longer wanted). To clean up the system afterwards, run depclean as given below.
>
>     emerge --ask --depclean
>
> As a safety measure, depclean will not remove any packages unless all
> required dependencies have been resolved. As a consequence of this, it often
> becomes necessary to run:
>
>     emerge --ask --verbose --update --newuse --deep @world

I understand `emerge --deselect` and `emerge --depclean`; Together they work 
as `apt remove --autoremove`.

I do not understand the last paragraph though. What does "depclean will not remove any 
packages unless all required dependencies have been resolved" mean exactly? 
Surely enough depclean won't remove dependencies currently in use. Why is it
necessary to run the *update* command then? What does it have to do with
package *removal*?

[1]: https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet#Package_removal