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?
migrated from stackoverflow.com Oct 26 '11 at 14:31
This question came from our site for professional and enthusiast programmers.
DNF, the yum replacement since Fedora 22, also provides a
which tries to remove all automatically installed and otherwise unused dependency packages - should be pretty much equivalent to
which removes examplepackage and all its automatically installed (and otherwise unused) dependencies.
Yum has the autoremove command since Fedora 19, and it is documented since Fedora 20/RHEL 7.
The usage is analogous to the dnf implementation, e.g.:
Change the behavior of yum removes
Yum supports a config option to change the default behavior of the
When this is set, the next
You can also temporarily test this option via something like:
Workaround for old Fedora version
(For Fedora versions where the yum autoremove subcommand is not available and/or
Although during installation of packages installed dependencies are marked as such (seems to be relatively new feature of rpm/yum).
You can find unneeded dependencies via:
This command line is inspired by fenris02's script.
After inspection of
you need to install the yum plugin "remove-with-leaves":
Building upon Larry Mohr's answer:
(Includes skipping for fastest mirror, if you wonder.)
In Fedora, the orphan package means no candidate repos for it to update!
or, just use the safety command.