carapace-sh/carapace-bin / skills/dnf5
dnf5
VerifiedUse when working with dnf5 — the next-generation RPM package manager for Fedora/RHEL. Covers CLI commands and options, configuration, plugin system (dnf5 active plugins and libdnf5 passive plugins), dnf5daemon D-Bus API, execution workflow, package specs (NEVRA), modularity, caching, migration from DNF4, libdnf5 library architecture, build system, and command-line aliases. Triggers on: "dnf5", "dnf", "libdnf5", "libdnf", "dnf5daemon", "dnf5-plugins", "libdnf5-plugins", "dnf5.conf", "repoquery", "versionlock", "distro-sync", "offline upgrade", "system-upgrade", "advisory", "comps", "modulemd", "NEVRA", "installroot", "forcearch", "repo variables", "metadata_expire", "setopt", "setvar", "config-manager", "repofrompath", "releasever", "basearch", "pluginpath".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.1 KB |
| references/aliases.md | markdown | 4.6 KB |
| references/build.md | markdown | 6.1 KB |
| references/caching.md | markdown | 4.6 KB |
| references/cli.md | markdown | 8.1 KB |
| references/comps.md | markdown | 1.7 KB |
| references/configuration.md | markdown | 15.7 KB |
| references/daemon.md | markdown | 13.4 KB |
| references/filtering.md | markdown | 2.2 KB |
| references/forcearch.md | markdown | 1.5 KB |
| references/installroot.md | markdown | 2.5 KB |
| references/libdnf5.md | markdown | 7.0 KB |
| references/migration.md | markdown | 8.5 KB |
| references/modularity.md | markdown | 4.1 KB |
| references/plugins.md | markdown | 16.2 KB |
| references/repo-variables.md | markdown | 2.4 KB |
| references/specs.md | markdown | 4.2 KB |
| references/system-state.md | markdown | 2.0 KB |
| references/workflow.md | markdown | 7.5 KB |
references/migration.md
View on GitHub# Migration from DNF4 to DNF5
All CLI, API, and configuration changes from DNF4 to DNF5. Covers dropped options, renamed options, new options, command changes, and configuration changes.
> **Source of truth**: <https://dnf5.readthedocs.io/en/stable/changes_from_dnf4.7.html> and <https://dnf5.readthedocs.io/en/stable/migrating_to_dnf5.7.html>.
## Fedora Migration History
| Fedora Version | Change |
|----------------|--------|
| 38 | microdnf based on libdnf5; dnf5 and libdnf5 introduced alongside existing dnf |
| 39 | Modularity support discontinued in dnf5 |
| 40 | Build system (mock, koji, copr) switched to dnf5; filelists no longer downloaded by default |
| 41 | dnf5 becomes default; `/usr/bin/dnf` symlink -> dnf5; state files differ between dnf4 and dnf5; transaction history not migrated |
## CLI Changes
### Global Options Scoping
Options that cannot be applied to all commands are moved from global options to specific commands only. Example: `--best`/`--no-best` are now only relevant to several transaction commands.
### Options Renaming
Boolean options renamed to `--<option>`/`--no-<option>` or `--enable-<option>`/`--disable-<option>` format. Original names retained as compatibility aliases.
### Strict Behavior
- `--disable-repo=REPO_ID` and `--setopt=[REPO_ID.]OPTION=VALUE` now **error** on invalid `REPO_ID` (aligned with `--repo` and `--enable-repo`).
- The `strict` config option is no longer considered.
### No Value Separator After Short Options
Short options don't have a separator between option name and value. `dnf -x package` works, but `dnf -x=package` means `--exclude =package`.
### Dropped Options
| Option | Replacement |
|--------|-------------|
| `-4/-6` | Dropped. Use `ip_resolve` config option. |
| `--disableexcludes` / `--disableexcludepkgs` | Dropped. Use `disable_excludes` config option. |
| `--disable` / `--enable` (and `--set-disabled` / `--set-enabled`) | Dropped. Use `dnf5 config-manager setopt repo.enabled=0`. |
| `--downloaddir` | Dropped. Use `--destdir` for `download` command. |
| `-e, --errorlevel` | Dropped (both option and config). |
| `--help-cmd` | Dropped. Use `-h` or `--help`. |
| `--noautoremove` | Now only for `remove` command. Workaround: `--setopt=clean_requirements_on_remove=False`. |
| `--obsoletes` | Dropped. Use `obsoletes` config option. |
| `-R, --randomwait` | Dropped. |
| `--rpmverbosity` | Dropped. Use `rpmverbosity` config option. |
| `-v, --verbose` | Not implemented. May be added for specific commands in the future. |
### Renamed Options
| Old Name | New Name |
|----------|----------|
| `--sec-severity` | `--advisory-severities` |
### Changed Behavior
| Option | Change |
|--------|--------|
| `--installroot` | New behavior for where configuration and variables are loaded from. |
| `--version` | Behavior is different. |
### New Options
| Option | Description |
|--------|-------------|
| `--allow-downgrade` / `--no-allow-downgrade` | Enable/disable downgrade of dependencies. For `install`, `upgrade`, etc. |
| `--dump-main-config` | Print configuration values on stdout. |
| `--dump-repo-config=REPO_ID` | Print repo configuration values. |
| `--offline` | Store transaction for offline execution. For all transactional commands. |
| `--show-new-leaves` | Show newly installed leaf packages. |
| `--skip-unavailable` | Skip packages not available in repos. For `install`, `upgrade`, etc. |
| `--use-host-config` | Use config/variables from host rather than installroot. |
## Command Changes
### Optional Subcommands Removed
Commands cannot have optional subcommands. Subcommands are now mandatory.
- Before: `dnf history <transaction ID>` -> Now: `dnf history info <transaction ID>`
- Before: `dnf updateinfo` -> Now: `dnf updateinfo summary`
### Per-Command Changes
| Command | Changes |
|---------|---------|
| `alias` | Dropped. Replaced by TOML-based aliases. |
| `automatic` | Now a DNF5 plugin. Only one `dnf5-automatic` timer shipped. |
| `autoremove` | Dropped `<spec>` positional arg. Dropped variants `autoremove-n/na/nevra`. |
| `builddep` | `--spec` and `--srpm` now only apply to following arguments. |
| `config-manager` | Parameters replaced by subcommands (`addrepo`, `setopt`). Drop-in override files instead of modifying existing. Dropped `--dump`. |
| `debuginfo-install` | No longer supports autoupdate. Use `config-manager` to enable debug repos. |
| `distro-sync` | Fails on unmatched args (use `--skip-unavailable`). Dropped aliases. |
| `downgrade` | Fails on unmatched args (use `--skip-unavailable`). |
| `download` | `--source` renamed to `--srpm`. Dropped `--downloaddir`. |
| `group` | New `--contains-pkgs`. Dropped `--ids`. Dropped `group mark install/remove` (use `--no-packages`). Dropped aliases (`groupinstall`, etc.). |
| `help` | Dropped. Use `--help`. |
| `history` | Subcommands mandatory. `userinstalled` dropped (use `repoquery --userinstalled`). `store` creates a directory. `replay` is now standalone. |
| `info` | Dropped `--all` and `--updates`. |
| `install` | Dropped variants `install-n/na/nevra`. |
| `list` | Dropped `--all`. `--available` behavior changed. Prints repo for installed packages. |
| `makecache` | Different cache dirs. Dropped `--timer`. Avoids downloading when possible. |
| `mark` | Renamed: `install`->`user`, `remove`->`dependency`. New `weak` subcommand. |
| `module` | Dropped `--all`. |
| `needs-restarting` | No longer scans open files. Default = old `--reboothint`. Dropped `-r` and `-u`. |
| `offline-distrosync` | Alias of `dnf5 distro-sync --offline`. |
| `offline-upgrade` | Alias of `dnf5 upgrade --offline`. |
| `remove` | No longer removes by provides (NEVRA/file provide only). Dropped variants and aliases. |
| `repoclosure` | Dropped `--pkg`. Use positional args. |
| `reposync` | Dropped `--downloadcomps`. Use `--download-metadata`. |
| `repolist`/`repoinfo` | Now subcommands of `repo`: `repo list` and `repo info`. |
| `repoquery` | Dropped `-a/--all`, `--alldeps`, `--nevra`, `--envra`, `--nvr`, `--unsatisfied`. Dropped `--archlist` alias. Dropped `-f` alias. `--resolve` -> `--providers-of=ATTRIBUTE`. `--queryformat` no longer adds trailing newline. Dropped `size` tag. `--source` -> `--sourcerpm`. |
| `shell` | Superseded by `do` command. No interactive shell or file redirect. |
| `system-upgrade` | Moved from plugin to built-in command. |
| `upgrade` | New `--minimal`. Fails on unmatched args. Dropped aliases. |
| `updateinfo` | Renamed to `advisory`. Subcommands mandatory. `--summary`/`--list`/`--info` -> subcommands. |
| `versionlock` | New format of configuration file. |
## API Changes
### Notable Changes
| Change | Details |
|--------|---------|
| `PackageSet::operator[]` | **Removed** (O(n^2) performance). Use `PackageSet` iterator. |
| `Package::get_epoch()` | Return type changed from `unsigned long` to `std::string`. |
| `Package.size` / `dnf_package_get_size()` | Ambiguous. Use `get_download_size()` and `get_install_size()`. |
| `dnf_sack_set_installonly` etc. | **Dropped**. Installonly from main Conf in Base. |
| `HY_PKG_UPGRADES_BY_PRIORITY` etc. | Priority filter separated. Use `filter_priority()` + `filter_latest_evr()`. |
| `HY_PKG_LATEST` | Replaced with `filter_latest_evr()`. |
| `proxy_auth_method()` | Return type changed from `OptionEnum<string>` to `OptionStringSet`. Multiple auth methods can be combined. |
## Configuration Changes
### Deprecated Options
| Option | Replacement |
|--------|-------------|
| `strict` | Split into `skip_broken` + `skip_unavailable`. Plus CLI `--skip-broken` and `--skip-unavailable`. |
| `metadata_timer_sync` | Obsoleted by `dnf5-makecache.timer` systemd timer. |
| `retries` | Deprecated. Was for deltarpm error retries. |
| `deltarpm` | Deprecated. Delta RPM support not planned. |
| `deltarpm_percentage` | Deprecated. Delta RPM support not planned. |
### Dropped Options
| Option | Details |
|--------|---------|
| `arch` / `basearch` | Use `--forcearch` instead. |
| `errorlevel` | Deprecated in DNF < 5, now dropped. |
### Changed Options
| Option | Change |
|--------|--------|
| `best` | Default changed to **`true`**. |
| `cachedir` | Paths changed. User: `~/.cache/libdnf5`. Root: `/var/cache/libdnf5`. |
| `cacheonly` | Changed from `bool` to **enum**: `all`, `metadata`, `none`. |
| `disable_excludes` | Use `*` instead of `all` to disable all excludes. |
| `keepcache` | Behavior slightly modified. |
| `optional_metadata_types` | Default changed to `comps,updateinfo`. |
### New Options
| Option | Description |
|--------|-------------|
| `allow_downgrade` | Enable/disable downgrade of dependencies. |
| `skip_broken` | Skip uninstallable packages. |
| `skip_unavailable` | Skip unavailable packages. |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |