package-cleanup(1) — Linux manual page


package-cleanup(1)                                    package-cleanup(1)

NAME         top

       package-cleanup - clean up locally installed, duplicate, or
       orphaned packages

SYNOPSIS         top

       package-cleanup [options] <item ...>

DESCRIPTION         top

       package-cleanup is a program for cleaning up the locally-
       installed RPMs.


       -c <config file>
              Use alternative config file (default is /etc/yum.conf).

       -h, --help
              Help; display a help message and then quit.

       -q, --quiet
              Print out nothing unnecessary.

       -v, --version
              Report program version and exit.

       -y     Agree to anything asked.

              List leaf nodes in the local RPM database.  Leaf nodes are
              RPMs that are not relied upon by any other RPM.

              List installed packages which are not available from
              currently configured repositories. This is identical to
              "yum list extras", which may provide better output.

              Remove old kernel and kernel-devel packages.

              List dependency problems in the local RPM database. If any
              problems are found it will exit with an exit code of 1.

              Scan for duplicates in the local RPM database.

              Scan for duplicates in the local RPM database and clean
              out the older versions.

              Remove the newest dupes instead of the oldest dupes when
              cleaning duplicates.

              Disable rpm scriptlets from running when cleaning

       --count <COUNT>
              Number of duplicate/kernel packages to keep on the system
              (default 2)

LEAVES OPTIONS         top

       --all  When listing leaf nodes also list leaf nodes that are not

              A package name that matches this regular expression will
              be considered a leaf.

              When listing leaf nodes do not list development packages.

              When listing leaf nodes do not list packages with files in
              bin directories.


              Do not remove kernel-devel packages when removing kernels

EXAMPLES         top

       List all dependency problems:
              package-cleanup --problems

       List all packages that are not in any Yum repository:
              package-cleanup --orphans

       Remove old kernels keeping 3 and leaving old kernel-devel
       packages installed:
              package-cleanup --oldkernels --count=3 --keepdevel

       List all leaf packages with no files in a bin directory whose
       name begins with either 'perl' or 'python':
              package-cleanup --leaves --exclude-bin

FILES         top

       As package-cleanup uses YUM libraries for retrieving all the
       information, it relies on YUM configuration for its default
       values like which repositories to use. Consult YUM documentation
       for details:


SEE ALSO         top


AUTHORS         top

       See the Authors file included with this program.

BUGS         top

       There are of course no bugs, but should you find any, you should
       first consult the FAQ section on
       and if unsuccessful in finding a resolution contact the mailing
       list:  To file a bug use for Fedora/RHEL/Centos related bugs
       and for all other bugs.

COLOPHON         top

       This page is part of the yum-utils (Yum Package Manager
       utilities) project.  Information about the project can be found
       at ⟨⟩.  It is not
       known how to report bugs for this man page; if you know, please
       send a mail to  This page was obtained from
       the project's upstream Git repository
       ⟨⟩ on
       2024-06-14.  (At that time, the date of the most recent commit
       that was found in the repository was 2020-03-11.)  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for
       the page, or you have corrections or improvements to the
       information in this COLOPHON (which is not part of the original
       manual page), send a mail to

Gijs Hollestelle            03 November 2005          package-cleanup(1)

Pages that refer to this page: yum-utils(1)yum(8@@yum)