Fedora – How to remove Orphan Packages in Fedora

dnffedorayum

I just switched from Ubuntu to Fedora14. In Ubuntu we had the apt-get autoremove thing to remove orphan/unused packages. What is the counterpart in Fedora?

Best Answer

package-cleanup --quiet --leaves from the yum-utils package will list the library packages which aren't relied upon by other packages. Unfortunately it tends to be a bit overeager. On my system, for example, it suggested removing libvirt. Adding the --exclude-bin argument helps. If you're happy with it's suggestion, then to clean up the packages, do:

# package-cleanup --quiet --leaves --exclude-bin | xargs yum remove -y
Related Question