---
name: "dnf4-modulesync"
section: "8"
platform: "linux"
package: "dnf-plugins-core"
version: "4.10.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dnf4-modulesync"
---

# dnf4-modulesync(8)

DNF modulesync Plugin Download packages from modules and/or create a repository with modular data.

## NAME

dnf4-modulesync - DNF modulesync Plugin

Download packages from modules and/or create a repository with modular data.

## SYNOPSIS

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

## DESCRIPTION

*modulesync* downloads packages from modules according to provided arguments and creates a repository with modular data in working directory. In environment with modules it is recommend to use the command for redistribution of packages, because DNF does not allow installation of modular packages without modular metadata on the system (Fail-safe mechanism). The command without an argument creates a repository like *createrepo\_c* but with modular metadata collected from all available repositories.

See examples.

## ARGUMENTS

- **\<module-spec\>**

  Module specification for the package to download. The argument is an optional.

## OPTIONS

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

- **-n, --newest-only**

  Download only packages from the newest modules.

- **--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 *nodejs* module and crete a repository with modular metadata in working directory

**dnf download nodejs**

- **dnf modulesync**

  The first *download* command downloads nodejs package into working directory. In environment with modules *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 working directory with nodejs package and modular metadata.

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

  Download package required for installation of *minimal* profile from module *nodejs* and stream *14* into directory */tmp/my-temp* and all required dependencies. Then it will create a repository in */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 package from required for installation of *minimal* profile from module *nodejs* and stream *14* into directory */tmp/my-temp*. The second command *dnf modulesync* will create a repository in */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 current system.

## SEE ALSO

- •

  **[dnf(8)](/dnf/8.md)**, DNF Command Reference

## AUTHOR

See AUTHORS in your Core DNF Plugins distribution

## COPYRIGHT

2014, Red Hat, Licensed under GPLv2+
