DNF4-REPOSYNC(8)

✨ DNF4-REPOSYNC ✨

okay bestie, gather round πŸ’– this one's from the dnf-plugins-core fam, and it's literally called dnf4-reposync β€” the DNF reposync Plugin. And what does it do? It synchronizes the packages of a remote DNF repository to a local directory. That's it. That's the whole vibe. Mirroring, but make it cute πŸͺžβœ¨


🌸 SYNOPSIS 🌸

dnf reposync [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

reposync makes local copies of remote repositories. And here's the iconic part: if a package is already sitting there in your local directory, it does not get downloaded again. No double-dipping, no wasted bandwidth, we love an efficient queen πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

All general DNF options are accepted, bestie. Namely, the --repoid option can be used to specify the repositories to synchronize. See Options in dnf(8) for details. Go look, it's right there 🫢

  • -a <architecture>, --arch=<architecture> β€” Download only packages of given architectures (the default is all architectures, greedy girl). Can be used multiple times.
  • --delete β€” Delete local packages that are no longer present in the repository. Bye bitch πŸ‘‹
  • --download-metadata β€” Download all repository metadata. The downloaded copy is instantly usable as a repository, so you do not need to run createrepo_c on it. When the option is used with –newest-only, only latest packages will be downloaded, but the metadata will still contain older packages. It might be useful to update metadata using createrepo_c –update to remove the packages with missing RPM files from metadata. Otherwise, DNF ends with an error due to the missing files whenever it tries to download older packages. 😭
  • -g, --gpgcheck β€” Remove packages that fail GPG signature checking after downloading. Exit code is 1 if at least one package was removed. Note that for repositories with gpgcheck=0 set in their configuration the GPG signature is not checked even with this option used ⚠️
  • -m, --downloadcomps β€” Also download and uncompress comps.xml. Consider using the --download-metadata option instead, which will download all available repository metadata. Just saying, that one eats harder πŸ“
  • --metadata-path β€” Root path under which the downloaded metadata are stored. It defaults to the --download-path value if not given.
  • -n, --newest-only β€” Download only newest packages per-repo. Out with the old ✨
  • --norepopath β€” Don't add the reponame to the download path. Can only be used when syncing a single repository (the default is to add the reponame).
  • -p <download-path>, --download-path=<download-path> β€” Root path under which the downloaded repositories are stored, relative to the current working directory. Defaults to the current working directory. Every downloaded repository has a subdirectory named after its ID under this path. The way it nests like that… iconic πŸ“
  • --safe-write-path β€” Specify the filesystem path prefix under which the reposync is allowed to write. If not specified it defaults to the download path of the repository. Useful for repositories that use relative locations of packages out of the repository directory (e.g. "../packages_store/foo.rpm"). Use with care, any file under the safe-write-path can be overwritten 🚨 Can be only used when syncing a single repository.
  • --remote-time β€” Try to set the timestamps of the downloaded files to those on the remote side. Time travel but legal ⏰
  • --source β€” Download only source packages.
  • -u, --urls β€” Just print urls of what would be downloaded, don't download. Window shopping only, no cap πŸ›οΈ

🌈 EXAMPLES 🌈

dnf reposync --repoid=the_repo

Synchronize all packages from the repository with id "the_repo". The synchronized copy is saved in the "the_repo" subdirectory of the current working directory. cute, self-contained, effortless ✨

dnf reposync -p /my/repos/path --repoid=the_repo

Synchronize all packages from the repository with id "the_repo". In this case the files are saved in the "/my/repos/path/the_repo" directory. Full custom placement, main character energy πŸ‘‘

dnf reposync --repoid=the_repo --download-metadata

Synchronize all packages and metadata from the "the_repo" repository. Metapilled πŸ’…


A repository synchronized with the --download-metadata option can be directly used in DNF, for example by using the --repofrompath option:

dnf --repofrompath=syncedrepo,the_repo --repoid=syncedrepo list
--available

πŸŽ€ SEE ALSO πŸŽ€

  • dnf(8), DNF Command Reference

πŸ’œ Author πŸ’œ

See AUTHORS in your Core DNF Plugins distribution.

2014, Red Hat, Licensed under GPLv2+


okay that's the whole page bestie, go forth and sync πŸ§šπŸ’–

this was version 4.10.1, dated Sep 27, 2025 β€” mwah, periodt πŸ’…πŸŒΈ

πŸ“¦ where this page comes from