prunerepo man page
prunerepo — remove old packages from rpm-md repository
prunerepo [--days DAYS] [--cleancopr] [--nocreaterepo] [--verbose] [-h] [-v] path
RPM packages that have newer version available in that same repository are deleted from filesystem and the rpm-md metadata are recreated afterwards. If there is a source rpm for a deleted rpm (and they both share the same directory path), then the source rpm will be deleted as well.
Support for specific repository structure (e.g. COPR) is also available making it possible to additionally remove build logs and whole build directories associated with a package.
After deletion of obsoleted packages, the command "createrepo_c --database --update" is called to recreate the repository metadata.
local path to a yum repository
- --days DAYS
only remove packages that are DAYS old or older by their build date. This option also affects subsequent deletion of build directories with no rpm or srpm inside when --cleancopr is used. These directories are deleted only if their latest modification time is more than DAYS in past.
additionally remove whole copr build dirs (contain build.info file) and logs if the associated package gets deleted
repository is not automatically recreated after deletion
print all deleted items to stdout
do not print any info messages, just do your job
- -h, --help
show this help message and exit
- -v, --version
print program version and exit
- prunerepo /path/to/repo
removes all packages for which a newer version is available in the repository
- prunerepo /path/to/repo --cleancopr
the same thing but also removes copr-specific build directories if they no longer contain any srpm/rpm package
- prunerepo /path/to/repo --days 7
does not delete a package built in last 7 days even if a newer version is available for it
- prunerepo /path/to/repo --days 7 --nocreaterepo
the same thing but omits call to createrepo_c at the end
Michal Novotny <firstname.lastname@example.org>