Sunday, October 16, 2011

Removing packages not supported by the Repository

Here's a small tip for rpm based systems (like fedora, centos etc) to remove all the obsolete packages that are not supported by the current repository.

  • List all packages not supported by the repository.
    $ package-cleanup --orphans


  • One can use xargs with the above command to remove them.
    $ package-cleanup --orphans | xargs yum remove -y
    

No comments:

Post a Comment