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:
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
emerge --deselect and
emerge --depclean; Together they work
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.
1 comment thread