DNF5-REPOSYNC(8)

πŸ’… DNF5-REPOSYNC(8) β€” the reposync command, explained by your favorite Unix bestie

okay so before we even start: this is a page from the dnf5 manual, and it's literally all about the reposync command. buckle up, bestie, we're making local copies of remote repos and it's gonna slay πŸŽ€


✨ NAME ✨

dnf5-reposync β€” the Reposync Command. that's it, that's the name, she's iconic πŸ’…


🌸 SYNOPSIS 🌸

dnf5 [GLOBAL OPTIONS] reposync [OPTIONS]

like, you got your global options first, then reposync, then whatever reposync options your heart desires. no cap 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the reposync command creates local copies of remote repositories. the way it works: it does not re-download packages that are already sitting there in the local directory β€” it just skips them, which is highkey efficient and we love that for us ✨

by default, reposync synchronizes all enabled repositories. but bestie, you're the main character here β€” you can totally customize which set of repositories gets synchronized using standard DNF5 options like --repo, --enable-repo, or --disable-repo. iykyk πŸ’œ


πŸ‘‘ OPTIONS πŸ‘‘

  • --arch=<architecture>, -a <architecture> β€” download only packages for the specified architecture. you can pass this option multiple times if you're feeling extra. the default behavior is to download packages for all architectures 🌈
  • --delete β€” removes local packages that are no longer present in the remote repository. basically a glow-up cleanse for your local dir πŸ’€
  • --destdir=<path> β€” specifies the root path where downloaded repositories are stored, relative to the current working directory. if you don't say anything, it defaults to the current working directory. each downloaded repository gets its own subdirectory named after its ID inside this path. cute and organized πŸŽ€
  • --download-metadata β€” downloads all repository metadata. the downloaded copy is instantly usable as a repository without needing to run createrepo_c. when used with --newest-only, only the latest package versions get downloaded β€” however, the metadata will still reference older packages too. to avoid issues caused by missing RPM files, consider updating the metadata using createrepo_c --update. otherwise, DNF will encounter errors when attempting to install older packages 😭 (not trying to stress you out but like… be aware)
  • --gpgcheck, -g β€” removes packages that fail OpenPGP signature verification after downloading. the command exits with a code of 1 if at least one package is removed. also, heads up: for repositories configured with gpgcheck=0, OpenPGP signatures are not checked, even when this option is used πŸ™ˆ
  • --metadata-path=<path> β€” specifies the root path where downloaded metadata files are stored. if you don't specify it, it defaults to whatever --destdir is 🫢
  • --min-buildtime <YYYY-MM-DD> β€” downloads only packages with buildtime newer than or equal to YYYY-MM-DD 00:00:00 UTC. note that this option may result in partially synchronized repositories, and the missing packages can cause dependency issues ⚠️ so like, use with intention
  • --newest-only, -n β€” downloads only the latest package versions from each repository. fresh off the press ✨
  • --norepopath β€” prevents the repository id from being added to the download path. this option can only be used when syncing a single repository. (the default behavior adds the repository id to the path, just so you know what you're opting out of) πŸ’…
  • --remote-time β€” attempts to set the timestamps of local downloaded files to match those on the remote side. syncing your clocks AND your vibes ⭐
  • --safe-write-path=<path> β€” defines the filesystem path prefix where reposync is allowed to write files. if not specified, it defaults to the repository's download path. this option is useful for repositories that use relative locations of packages leading outside of the repository directory (e.g., ../packages_store/foo.rpm).
Caution: any file under the safe-write-path can be overwritten. also, this option can only be used when syncing a single repository. please be careful, bestie 😭
  • --srpm β€” downloads source packages. equivalent to using --arch=src 🧚
  • --urls, -u β€” prints the URLs of the files that would be downloaded without actually downloading them. window shopping mode, obsessed πŸ“

πŸ”₯ EXAMPLES πŸ”₯

dnf reposync --repoid=the_repo

synchronizes all packages from the repository with id the_repo. the synchronized copy is saved in the the_repo subdirectory of the current working directory. simple, clean, slayed πŸ’–

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

synchronizes all packages from the repository with id the_repo. in this case, files are saved in the /my/repos/path/the_repo directory. now that's called placement πŸ‘‘

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

synchronizes all packages and metadata from the the_repo repository.

a repository synchronized with the --download-metadata option can be directly used with DNF β€” for example, by using the --repofrompath option:
dnf --repofrompath=syncedrepo,the_repo --repoid=syncedrepo list --available

literally plug and play, we love a self-sufficient queen 🌸


πŸ’œ Author πŸ’œ

see AUTHORS.md in the dnf5 source distribution. the real ones 🫢


contributors to the dnf5 project. periodt πŸ’…


and that's the whole page, bestie β€” brought to you by the dnf5 manual, dated Oct 17, 2026 πŸŽ€ go forth and sync responsibly, mwah πŸ’–

πŸ“¦ where this page comes from