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] [--verbose] [-h]
10       [-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 that are DAYS old or older by their build
33           date. This option also affects subsequent deletion of build
34           directories with no rpm or srpm inside when --cleancopr is used.
35           These directories are deleted only if their latest modification
36           time is more than DAYS in past.
37
38       --cleancopr
39           additionally remove whole copr build dirs (contain build.info file)
40           and logs if the associated package gets deleted
41
42       --nocreaterepo
43           repository is not automatically recreated after deletion
44
45       --verbose
46           print all deleted items to stdout
47
48       --verbose
49           do not print any info messages, just do your job
50
51       -h, --help
52           show this help message and exit
53
54       -v, --version
55           print program version and exit
56

EXAMPLES

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

AUTHORS

74       Michal Novotny <clime@redhat.com>
75
76
77
78                                  07/28/2020                      PRUNEREPO(1)
Impressum