PRUNEREPO(1)
π PRUNEREPO(1) π
okay so bestie, welcome to the prunerepo manual page, the little glow-up glockenspiel that keeps your rpm-md repo from becoming a hoarder house π she's a one-trick pony in the best way: old packages? gone. metadata? rebuilt. no cap.
πΈ SYNOPSIS πΈ
prunerepo [--days DAYS] [--cleancopr] [--nocreaterepo] [--log-level LOG_LEVEL] [--dry-run] [-h] [-v] path
(that synopsis is literally the whole personality β¨)
π¦ DESCRIPTION π¦
so here's the vibe β¨ RPM packages that have a newer version available in that same repository get yeeted from the filesystem, and then the rpm-md metadata gets recreated afterwards. icon behavior, honestly.
and it gets better π«Ά if there's a source rpm for a deleted rpm β and they both share the same directory path β then that source rpm gets deleted too. matching set, going down together, it's giving ride or die π
she also has support for specific repository structures (e.g. COPR) π which makes it possible to additionally remove build logs and whole build directories associated with a package. full clean-out, main character energy.
and after all the obsoleted packages are deleted, she runs:
createrepo_c --database --update
to recreate the repository metadata. periodt. π
π ARGUMENTS π
pathβ local path to a yum repository. like, the actual folder. on your actual disk. π
β¨ OPTIONS β¨
--days DAYSβ only remove packages (and build directories, when--cleancopris in play) that are DAYS old or older. for packages it's by their build date; for directories it's the last modification time that counts. so she's checking two different clocks, iykyk β°--cleancoprβ additionally remove whole copr build dirs and logs if the associated package gets deleted. the deep clean π₯--alwayscreaterepoβ Recreate repository even when there was no change in data. she's gonna rebuild anyway, just because πββοΈ--nocreaterepoβ repository is not automatically recreated (not even after data deletion). and yes, it Suppresses--alwayscreaterepoβ the two do not coexist, bestie, one of them wins π€--log-levelβ set logging to desired level. tell her how chatty you want her π£οΈ--dry-runβ do not remove anything from the repository and print the actions instead. and heads up: Verbose mode will be set. she narrates the whole thing π¬-h,--helpβ show this help message and exit. the classic π«Ά-v,--versionβ print program version and exit. just the numbers, no drama π§
π EXAMPLES π
prunerepo /path/to/repo
removes all packages for which a newer version is available in the repository. the og move π
prunerepo /path/to/repo --cleancopr
the same thing but also removes copr-specific build directories if they no longer contain any srpm/rpm package. crumbs cleaned, floor swept π§Ήβ¨
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. the grace period, the mercy, the protective lil bubble π«§
prunerepo /path/to/repo --days 7 --nocreaterepo
the same thing but omits call to createrepo_c at the end. she deletes, she does not rebuild. no follow-through, respectfully π
π AUTHORS π
Michal Novotny <clime@redhat.com> β the legend who made this whole thing happen, we stan π
fr fr do not come for me if you skip reading the options β --dry-run exists specifically so you can vibe check before anything gets deleted. use it, bestie π
okay that's the whole page!! this was prunerepo(1), manual page, dated 02/18/2025 β now go clean that repo up, you absolute icon πβ¨ππ¦π
π¦ where this page comes from
- epel 10: prunerepo 1.26-1.el10_0 Β· GPL-2.0-or-later
- epel 9: prunerepo 1.26-1.el9 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms