On Gentoo is there a way to find a list of installed packages which doesn’t have other packages depended on them

emergegentoopackage-management

On Gentoo, is there a way to find a list of installed packages which doesn't have other packages depended on them (so called leaf packages)? Or, is there analog of pkg-orphan FreeBSD utility?

Best Answer

That's what emerge --pretend --depclean does. It looks for packages that are:

  • not depended upon by other ebuilds, and
  • neither in world nor system sets

It's a good idea to run emaint --check world to find (and later fix) potential problems with your world file before a depclean.

Other useful tools: Gentoo maintenance