---
name: "libdnf5-local"
section: "8"
platform: "linux"
package: "dnf5"
version: "5.4.6.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libdnf5-local"
---

# libdnf5-local(8)

Local Plugin

## NAME

libdnf5-local - Local Plugin

## DESCRIPTION

After each libdnf5 transaction copy all downloaded packages to local repositories on the filesystem and generate repository metadata.

The plugin creates two repositories:

- •

  **\_dnf\_local** for packages from repositories with **pkg\_gpgcheck** enabled. The **pkg\_gpgcheck** setting is inherited from the main configuration. The repository doesn't specify any **gpgkey**, it assumes all required keys were already imported.

- •

  **\_dnf\_local\_nogpgcheck** for packages from repositories with **pkg\_gpgcheck** disabled. This repository has **pkg\_gpgcheck** set to **false**.

Each repository is only created when there are cached packages in it.

Both repositories are configured with the following options:

```
skip_if_unavailable = true
metadata_expire = 0
```

The **\_dnf\_local** repository has **cost = 500** and the **\_dnf\_local\_nogpgcheck** repository has **cost = 501**, so the gpgcheck-enabled repository is preferred when both contain the same package.

To generate the metadata *createrepo\_c* is required.

## CONFIGURATION

The plugin configuration is in **/etc/dnf/libdnf5-plugins/local.conf**. The minimal content of the conf file should contain **main** and **createrepo** sections.

The **main** section requires:

- **name**

  string \<#string-label\>

  The plugin's name is **local**

- **enabled**

  Whether or where the plugin is enabled: **true**, **false**, **host-only**, **installroot-only**.

  - •

    For **host-only** the plugin will run only on transactions in the default installroot **/**.

  - •

    For **installroot-only** the plugin will run only on transactions in installroots different from **/**.

It can also contain:

- **repodir**

  string \<#string-label\>

  Path where the local repository is located. By default it is in persistdir \<#persistdir-options-label\> in **plugins/local** subdirectory.

- **repodir\_nogpgcheck**

  string \<#string-label\>

  Path where the local repository for packages from repos with **pkg\_gpgcheck** disabled is located. By default it is in persistdir \<#persistdir-options-label\> in **plugins/local-nogpgcheck** subdirectory.

The **createrepo** section requires:

- **enabled**

  boolean \<#boolean-label\>

  Whether running **createrepo** to generate repodata is enabled: **true** or **false**.

Additionally it can contain:

- **cachedir**

  string \<#string-label\>

  If you want to speed up **createrepo** with the **--cachedir** option. Not used by default.

- **quiet**

  boolean \<#boolean-label\>

  Whether to run **createrepo** with **--quiet** option. On by default.

- **verbose**

  boolean \<#boolean-label\>

  Whether to run **createrepo** with **--verbose** option. Off by default.

## Author

See AUTHORS.md in dnf5 source distribution.

## Copyright

Contributors to the dnf5 project.
