Saturday, July 25, 2009

Remove unused RPM dependencies with --remove-leaves

Here's something I find it annoying. You do:
yum install some_package

It downloads a bunch of of dependencies. Then, you realize you don't need that package and want to remove it with:
yum remove some_package

That's OK, but most of the dependencies that were downloaded to allow your package to work, will stay on your system (probably unused).

That's where yum-plugin-remove-with-leaves comes in.
yum install yum-plugin-remove-with-leaves

Then to remove your package (and those dependencies you don't need anymore):
yum remove --remove-leaves some_package

That should remove "any unused dependencies that were brought in by an install but would not normally be removed. It helps to keep a system clean of unused libraries and packages."

0 comments: