1PRUNEREPO(1)                                                      PRUNEREPO(1)
2
3
4

NAME

6       prunerepo - remove old packages from rpm-md repository
7

SYNOPSIS

9       prunerepo [--days DAYS] [--cleancopr] [--nocreaterepo] [--log-level
10       LOG_LEVEL] [--dry-run] [-h] [-v] path
11

DESCRIPTION

13       RPM packages that have newer version available in that same repository
14       are deleted from filesystem and the rpm-md metadata are recreated
15       afterwards. If there is a source rpm for a deleted rpm (and they both
16       share the same directory path), then the source rpm will be deleted as
17       well.
18
19       Support for specific repository structure (e.g. COPR) is also available
20       making it possible to additionally remove build logs and whole build
21       directories associated with a package.
22
23       After deletion of obsoleted packages, the command "createrepo_c
24       --database --update" is called to recreate the repository metadata.
25

ARGUMENTS

27       path
28           local path to a yum repository
29

OPTIONS

31       --days DAYS
32           only remove packages (and build directories when --cleancopr is
33           used) that are DAYS old or older (for packages by their build date,
34           for directories the last modification time is considered)
35
36       --cleancopr
37           additionally remove whole copr build dirs and logs if the
38           associated package gets deleted
39
40       --alwayscreaterepo
41           Recreate repository even when there was no change in data
42
43       --nocreaterepo
44           repository is not automatically recreated (not even after data
45           deletion). Supresses --alwayscreaterepo.
46
47       --log-level
48           set logging to desired level
49
50       --dry-run
51           do not remove anything from the repository and print the actions
52           instead. Verbose mode will be set.
53
54       -h, --help
55           show this help message and exit
56
57       -v, --version
58           print program version and exit
59

EXAMPLES

61       prunerepo /path/to/repo
62           removes all packages for which a newer version is available in the
63           repository
64
65       prunerepo /path/to/repo --cleancopr
66           the same thing but also removes copr-specific build directories if
67           they no longer contain any srpm/rpm package
68
69       prunerepo /path/to/repo --days 7
70           does not delete a package built in last 7 days even if a newer
71           version is available for it
72
73       prunerepo /path/to/repo --days 7 --nocreaterepo
74           the same thing but omits call to createrepo_c at the end
75

AUTHORS

77       Michal Novotny <clime@redhat.com>
78
79
80
81                                  07/21/2023                      PRUNEREPO(1)
Impressum