2012-01-13. In a recent (started last August) gentoo system, some packages have had trouble in merging, e.g. gdm, several with errors about an image library not recognising a particular file's format. Traditionally I've just emerged things, done removals if needed to avoid clashes that prevent desired upgrades, and finally built a fully new system every few years (until KDE3 finished, and KDE4 was still unusable, so I had to keep an old system). But here are some finesses for making packages happy about /all/ dependencies being present, and removing cruft (pulled in ebuilds) that no longer are needed. Note that "@world" denotes the list (stored in /var/lib/portage/world ) of all packages that have been /asked for/ (emerge XXXX); the total installed set (listed under /var/db/pkg/) should be these plus all dependencies. # check that all the possible (build as well as runtime) dependencies # of installed packages are present emerge --update --newuse --deep --with-bdeps=y @world # check/remove any packages no longer required by the @world list emerge --depclean -pv (when run properly, without -pv, this then runs commands to correct problems by any removed gcc, gcc-config x86_64-pc-linux-gnu-4.4.5 fix_libtool_files.sh 4.4.5 ) # and check further for any breakages (from removal of old libraries) (? rv -v -r /var/cache/revdep-rebuild/* ?) revdep-rebuild -pv # to ensure X11 drivers match the latest server emerge `qlist -I -C x11-drivers/` # and possibly rebuild everything, to use new gcc etc, emerge -e @world