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

Comments on What does `emerge --update --newuse --deep @world` have to do with package removal?

Post

What does `emerge --update --newuse --deep @world` have to do with package removal?

+3
−0

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:

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 was not of much enlightening here; It actually employs the very same wording.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

The information in the manpage is *slightly* more useful (emphasis mine): As a consequence, it is of... (1 comment)
The information in the manpage is *slightly* more useful (emphasis mine): As a consequence, it is of...
mcalex‭ wrote about 3 years ago · edited about 3 years ago

The information in the manpage is slightly more useful (emphasis mine): "As a consequence, it is often necessary to run emerge --update --newuse --deep @world prior to depclean."

So I'd guess the command gets a stale system to a state where all current dependencies are properly accounted for reducing the chance of unexpected behavior when you remove the unwanted package.