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 runcreaterepo_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 usingcreaterepo_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 of1if at least one package is removed. also, heads up: for repositories configured withgpgcheck=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--destdiris π«Ά--min-buildtime <YYYY-MM-DD>β downloads only packages with buildtime newer than or equal toYYYY-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 wherereposyncis 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-metadataoption can be directly used with DNF β for example, by using the--repofrompathoption:
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 π«Ά
π Copyright π
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
- arch rolling: dnf5 5.4.6.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms