createrepo_c (8) - Linux Man Pages

createrepo_c: Create rpm-md format (xml-rpm-metadata) repository


createrepo_c - Create rpm-md format (xml-rpm-metadata) repository


createrepo_c [options] <directory>


-V --version

Show program's version number and exit.

-q --quiet

Run quietly.

-v --verbose

Run verbosely.

-x --excludes <packages>

File globs to exclude, can be specified multiple times.

--basedir <basedir>

Basedir for path to directories.

-u --baseurl <URL>

Optional base URL location for all files.

-g --groupfile GROUPFILE

Path to groupfile to include in metadata.

-s --checksum <checksum_type>

Choose the checksum type used in repomd.xml and for packages in the metadata. The default is now sha256.

-p --pretty

Make sure all xml generated is formatted (default)

-d --database

Generate sqlite databases for use with yum.


Do not generate sqlite databases in the repository.


If metadata already exists in the outputdir and an rpm is unchanged (based on file size and mtime) since the metadata was generated, reuse the existing metadata rather than recalculating it. In the case of a large repository with only a few new or modified rpms this can significantly reduce I/O and processing time.


Use the existing repodata for --update from this path.


Skip the stat() call on a --update, assumes if the filename is the same then the file is still the same (only use this if you're fairly trusting or gullible).

-i --pkglist <filename>

Specify a text file which contains the complete list of files to include in the repository from the set found in the directory. File format is one package per line, no wildcards or globs.

-n --includepkg <packages>

Specify pkgs to include on the command line. Takes urls as well as local paths.

-o --outputdir <URL>

Optional output directory.

-S --skip-symlinks

Ignore symlinks of packages.

--changelog-limit <number>

Only import the last N changelog entries, from each rpm, into the metadata.


Include the file's checksum in the metadata filename, helps HTTP caching (default).


Do not include the file's checksum in the metadata filename.

--retain-old-md <N>

Keep around the latest (by timestamp) N copies of the old repodata.

--distro DISTRO

Distro tag and optional cpeid: --distro'cpeid,textname'.

--content CONTENT_TAGS

Tags for the content in the repository.

--repo REPO_TAGS

Tags to describe the repository itself.

--revision REVISION

User-specified revision for this repository.

--read-pkgs-list READ_PKGS_LIST

Output the paths to the pkgs actually read useful with --update.


Number of workers to spawn to read rpms.


Use xz for repodata compression.

--compress-type <compress_type>

Which compression type to use.


Keep groupfile and updateinfo from source repo during update.


Enforce maximal compatibility with classical createrepo.

--retain-old-md-by-age AGE

During --update, remove all files in repodata/ which are older then the specified period of time. (e.g. '2h', '30d', ...). Available units (m - minutes, h - hours, d - days)

-c --cachedir CACHEDIR.

Set path to cache dir


Tells createrepo to generate deltarpms and the delta metadata.

--oldpackagedirs PATH

Paths to look for older pkgs to delta against. Can be specified multiple times.

--num-deltas INT

The number of older versions to make deltas against. Defaults to 1.

--max-delta-rpm-size MAX_DELTA_RPM_SIZE

Max size of an rpm that to run deltarpm against (in bytes).


Gen sqlite DBs locally (into a directory for temporary files). Sometimes, sqlite has a trouble to gen DBs on a NFS mount, use this option in such cases. This option could lead to a higher memory consumption if TMPDIR is set to /tmp or not set at all, because then the /tmp is used and /tmp dir is often a ramdisk.

--cut-dirs NUM

Ignore NUM of directory components in location_href during repodata generation

--location-prefix PREFIX

Append this prefix before location_href in output repodata


Expert (risky) option: Ignore an existing .repodata/. (Remove the existing .repodata/ and create an empty new one to serve as a lock for other createrepo intances. For the repodata generation, a different temporary dir with the name in format will be used). NOTE: Use this option on your own risk! If two createrepos run simultaneously, then the state of the generated metadata is not guaranted - it can be inconsistent and wrong.