User:Sam/Portage help/Maintaining a Gentoo system

There are a few things I end up repeating quite often in and the forums.

What's normal?
Upgrades are not supposed to be hard. Furthermore, they're not hard for most Gentoo users.

But I don't deny that some people experience issues. A fair amount of such cases are because of old, outdated, or bad habits, which then lead to people avoiding upgrades, and then the problem gets worse.

World file hygiene
This is easily the most important point: your world file at should only contain things you personally want.

It should not contain (non-exhaustive list):
 * 1) libraries (unless you want them for development), e.g. ;
 * 2) packages you had to re-emerge to try fix something (use  when doing that!)
 * 3) possibly  unless you personally use it
 * 4) anything you don't personally want/use/need

Erroneous entries in your world file will lead to blockers when e.g. a library becomes obsolete or replaced, leading you to have to fix the problem when for most people, it'll be resolved automatically.

Example
is absorbing (the details aren't relevant here, but see ).

If one has sys-libs/e2fsprogs-libs in your world file, you are telling Portage you must have it. And it will try very, very hard to honour your request, like so:

Note that the main reason it is pulling in e2fsprogs-libs here is:. This means it's in your world file! It's trying hard to hold onto it because you told it to.

The solution ("deselect it", i.e. remove it from the world file):

Now Portage is no longer being instructed to keep  and should proceed to upgrade.

Depclean regularly
Depcleaning after every world upgrade is essential. This removes unnecessary packages from your system and keeps the dependency graph clean.

Failure to do so may result in:
 * 1) older versions of toolchain versions being used unnecessarily (e.g. gcc, binutils)
 * 2) packages misbehaving when they detect a package installed which has been removed from the tree
 * 3) possibly confusing  output on upgrades.

If Portage tries to remove packages you need, you should tell it that you need them:

Never unmerge anything
Consider banned. Removing packages without may result in removing something which is needed will only lead to broken packages and a possibly bricked install.

If you no longer want a package, run:

Portage will ask you if you wish to remove it only if it is safe to do so (nothing depends on it). It will bail out if it is unsafe.