DNF4-MODULESYNC(8)

πŸ’– NAME πŸ’–

okay bestie, this is the dnf4-modulesync(8) page from dnf-plugins-core, and it's the DNF modulesync Plugin πŸ’…. Its whole personality? Download packages from modules and/or create a repository with modular data. literally that's the gig.

πŸ¦‹ SYNOPSIS πŸ¦‹

dnf modulesync [options] [<module-spec>...]

✨ DESCRIPTION ✨

okay so modulesync downloads packages from modules according to the arguments you give it, and it creates a repository with modular data in the working directory. No cap.

In an environment with modules, it's recommended to use this command for redistribution of packages, because DNF does not allow installation of modular packages without modular metadata on the system β€” that's the Fail-safe mechanism, periodt.

The command without an argument? It creates a repository like createrepo_c but with modular metadata collected from all available repositories. iconic.

See examples below πŸ‘€.

πŸŽ€ ARGUMENTS πŸŽ€

  • <module-spec> β€” the module specification for the package to download. This argument is optional, so you can skip it if you want.

πŸ’… OPTIONS πŸ’…

All general DNF options are accepted, bestie. Namely, the --destdir option can be used to specify the directory where packages will be downloaded and the new repository created. See Options in dnf(8) for details.

  • -n, --newest-only β€” download only packages from the newest modules. fresh-only behavior, we love.
  • --enable_source_repos β€” enable repositories with source packages.
  • --enable_debug_repos β€” enable repositories with debug-info and debug-source packages.
  • --resolve β€” resolve and download needed dependencies.

🌈 EXAMPLES 🌈

dnf modulesync nodejs

Download packages from the nodejs module and create a repository with modular metadata in the working directory.

dnf download nodejs
dnf modulesync

The first download command downloads the nodejs package into the working directory. In an environment with modules, the nodejs package can be a modular package, therefore when I create a repository I have to insert also modular metadata from available repositories to ensure 100% functionality. Instead of createrepo_c, use dnf modulesync to create a repository in the working directory with the nodejs package and modular metadata.

dnf --destdir=/tmp/my-temp modulesync nodejs:14/minimal --resolve

Download the package required for installation of the minimal profile from module nodejs and stream 14 into directory /tmp/my-temp, plus all required dependencies. Then it will create a repository in the /tmp/my-temp directory with previously downloaded packages and modular metadata from all available repositories.

dnf module install nodejs:14/minimal --downloadonly
--destdir=/tmp/my-temp
dnf modulesync --destdir=/tmp/my-temp

The first dnf module install command downloads the package required for installation of the minimal profile from module nodejs and stream 14 into directory /tmp/my-temp. The second command, dnf modulesync, will create a repository in the /tmp/my-temp directory with previously downloaded packages and modular metadata from all available repositories. In comparison to dnf --destdir=/tmp/my-temp modulesync nodejs:14/minimal --resolve, it will only download packages required for installation on the current system.

πŸ”₯ SEE ALSO πŸ”₯

  • dnf(8), DNF Command Reference

🫢 AUTHOR 🫢

See AUTHORS in your Core DNF Plugins distribution πŸ’–.

2014, Red Hat, Licensed under GPLv2+


mwah πŸ’‹ this page is version 4.10.1, dated Mar 28, 2025, and it's the DNF4-MODULESYNC(8) manual page. slay, bestie, go build that modular repo 🫢✨

πŸ“¦ where this page comes from