How to query for obsolete/outdated installed packages (ebuilds) on Gentoo

gentoopackage-management

Installed packages sometimes become obsolete because the package got version bumped and the ebuild for the old version got dropped. Also it happens that packages are dropped completely from the tree (usually for a good reason). I'd like to query those packages in order to take the appropriate action (update, remove).

How to query installed packages that

  1. have no ebuild for the current installed version; and
  2. have no ebuild at all anymore (e.g. because it got deleted)

Best Answer

For this you can use eix-test-obsolete from app-portage/eix. eix-test-obsolete is set of few tests to check is package is obsolete.

I output packages are grouped by specific test. One of them is "Installed packages with a version not in the database (or masked)". Description of all of them you can find in man eix.