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?
emerge --pretend --depclean does. It looks for packages that are:
- not depended upon by other ebuilds, and
- neither in
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
If you want to see what packages in the
@world set are not also dependencies of other installed packages, you can run
emerge --pretend --depclean @world (or
emerge -pc @world). Also note that if you try to remove a package using
emerge --depclean atom (instead of
emerge --unmerge atom), portage will only remove the package if nothing else depends on it.