DNF4-REPOSYNC(8)

πŸ’… DNF4-REPOSYNC(8) β€” the reposync glow-up

okay so bestie, welcome to dnf4-reposync, aka the DNF reposync Plugin ✨ (it lives in dnf-plugins-core, iykyk). It's got main character energy and exactly one job: synchronize packages of a remote DNF repository to a local directory πŸŽ€


πŸ¦‹ SYNOPSIS

dnf reposync [options]

✨ DESCRIPTION

reposync makes local copies of remote repositories, periodt. Packages that are already present in the local directory are not downloaded again β€” she's efficient like that πŸ’… no cap.


πŸ”₯ OPTIONS

All general DNF options are accepted, fr fr. Namely, the --repoid option can be used to specify the repositories to synchronize. Peep Options in dnf(8) for the details πŸ‘‘

  • -a <architecture>, --arch=<architecture> β€” download only packages of given architectures (default is all architectures). Can be used multiple times, so go off πŸ’–
  • --delete β€” delete local packages no longer present in repository. bye bestie πŸ‘‹
  • --download-metadata β€” download all repository metadata. The downloaded copy is instantly usable as a repository, no need to run createrepo_c on it. When the option is used with --newest-only, only latest packages will be downloaded, but 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 😭 (yes that's a real gotcha, don't @ me)
  • -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 🚨 (so like, don't feel too safe)
  • -m, --downloadcomps β€” also download and uncompress comps.xml. Consider using --download-metadata option which will download all available repository metadata 🫢
  • --metadata-path β€” root path under which the downloaded metadata are stored. It defaults to --download-path value if not given 🌸
  • -n, --newest-only β€” download only newest packages per-repo. fresh fresh fresh πŸ“
  • --norepopath β€” don't add the reponame to the download path. Can only be used when syncing a single repository (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 πŸ“
  • --safe-write-path β€” specify the filesystem path prefix under which the reposync is allowed to write. If not specified it defaults to download path of the repository. Useful for repositories that use relative locations of packages out of 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. matching vibes only ⏰
  • --source β€” download only source packages 🧚
  • -u, --urls β€” just print urls of what would be downloaded, don't download. window shopping, iconic πŸ‘‘
  • --min-buildtime <YYYY-MM-DD> β€” download only packages with buildtime newer than YYYY-MM-DD. Note that this option may result in partially synchronized repositories and the missing packages can cause dependency issues πŸ™ˆ (she's a little chaotic, use responsibly)

🌈 EXAMPLES

dnf reposync --repoid=the_repo

Synchronize all packages from the repository with id "the_repo". The synchronized copy is saved in "the_repo" subdirectory of the current working directory πŸ’–

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

Synchronize all packages from the repository with id "the_repo". In this case files are saved in "/my/repos/path/the_repo" directory πŸ“‚

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

Synchronize all packages and metadata from "the_repo" repository ✨


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

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

like, she's ready to serve immediately, no extra steps 🫢


πŸ¦‹ SEE ALSO

  • dnf(8), DNF Command Reference πŸ‘‘

πŸ’œ AUTHOR

See AUTHORS in your Core DNF Plugins distribution πŸŽ€


2026, Red Hat, Licensed under GPLv2+ ⭐


ngl bestie, that's the whole page. go sync something iconic πŸ’…

mwah πŸ’‹ β€” this was dnf-plugins-core version 4.7.0, dated Aug 10, 2026, and yes she ate πŸŽ€βœ¨

πŸ“¦ where this page comes from