Computer Tips - How can I find leaf and orphan packages?

Date: 2009jun10 Updated: 2023may7 OS: Linux Distro: RedHat/Fedora/CentOS Keywords: leafs, orphans Q. How can I find leaf and orphan packages? A. Install the dnf-utils package if you don't already have it:
dnf install dnf-utils
Then you can run:
package-cleanup --leaves List leaf nodes in the local RPM database. Leaf nodes are RPMs that are not relied upon by any other RPM.
package-cleanup --orphans List installed packages which are not available from currently configured repositories.
Its not automatically safe to erase the packages you find.