Skip to content
Back to skills

Dnf5 Security Updates Knowledge Patch

ASecurity

DNF5

  • 25 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added May 27, 2026
developmentpythongoshellbashapisecurity

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill dnf5-security-updates-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dnf5 Security Updates Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dnf5 Security Updates Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-dnf5-security-updates-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-dnf5-security-updates-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dnf5-security-updates-knowledge-patch
description: DNF5
version: "5.4.8.0"
license: MIT
metadata:
  author: Nevaberry
---


# DNF5 Security Updates

Load this skill when configuring security updates, migrating DNF4 commands,
selecting packages and repositories, staging upgrades, or automating DNF5
through D-Bus, libdnf5, or Ansible. Use the topic references for complete
command, configuration, output-schema, and platform guidance.

## Reference index

| Reference | Topics |
| --- | --- |
| [Security advisories and automatic updates](references/security-and-automatic-updates.md) | Advisory scopes, minimum fixes, JSON, timers, emitters, signatures, key imports |
| [Configuration, policies, and plugins](references/configuration-policies-and-plugins.md) | Configuration order, variables, vendor policies, exclusions, plugins, CLI parsing, terminal output |
| [Repositories, packages, and queries](references/repositories-packages-and-queries.md) | Repository definitions, origin filters, downloads, reposync, queries, metadata, versionlock |
| [Transactions, upgrades, and history](references/transactions-upgrades-and-history.md) | Resolution, comps, reasons, locks, history, replay, offline upgrades, restart checks, experimental manifests |
| [Automation, APIs, and Ansible](references/automation-apis-and-ansible.md) | D-Bus sessions, authorization, streaming, transactions, libdnf5, plugins, Ansible |
| [Migration and platform notes](references/migration-and-platform-notes.md) | ABI compatibility, Fedora transition, RHEL constraints, build and packaging requirements |

## Compatibility changes and deprecations

Skip libdnf5 5.4.3.0 when upgrading: it can crash applications built against
5.4.2.1 or earlier, including PackageKit. 5.4.4.0 restores compatibility by
removing `libdnf5::base::Transaction::persistence`. The move from libdnf5 5.1
to 5.2 also breaks API and ABI compatibility; port and rebuild 5.1 callers.

In 5.4.7.0, use `plugin_conf_dir`; `pluginconfpath` is deprecated. Select
`rhsm-container` in place of the renamed libdnf5 plugin `rhsm`.
`enabled` is deprecated in `ConfigMain`, and the repository-level
`protected_packages` option is deprecated in 5.4.3.0.

The experimental manifest plugin switches to libpkgmanifest inputs in
5.4.7.0: use `packages.input.yaml` in place of `rpms.in.yaml`.
Its `manifest install` requires exact checksum matches; installed-package
checksums are recorded when available. It requires libpkgmanifest 0.5.10
or later for `hdr_checksum`.

DNF5 Automatic removed `[emitters]`'s `send_error_messages`; failed
operations are always reported through the configured emitters.
`deltarpm`, `deltarpm_percentage`, and `retries` are deprecated; the old
`retries` controlled re-downloads after delta RPM errors.

### Porting command lines

- Use `-x bash` or `--exclude=bash`; `-x=bash` passes the pattern `=bash`.
- Replace `strict=False` with `skip_broken=True` for unsolvable dependencies
  and `skip_unavailable=True` for unavailable requests. The `upgrade` CLI
  drops `--skip-broken`; use `--best` or `--no-best` for candidate selection.
- `upgrade`, `downgrade`, `distro-sync`, and `mark` fail on arguments that
  match no installed package; `--skip-unavailable` skips those arguments.
- Replace `--disableexcludes=all` with `--setopt='disable_excludes=*'`.
- Use `config-manager addrepo` for `--add-repo` and
  `config-manager setopt updates.enabled=0` for `--save --setopt` edits.
- The `do` command replaces `shell`; pass actions on the command line.
- Use explicit advisory subcommands and `--advisory-severities` in place
  of `--sec-severity`. Positional advisory specs select advisory IDs.

## Selecting security fixes

The advisory CLI defaults to `--available`: advisories containing newer
versions of installed packages. `--updates` additionally requires an
available newer package version. `--installed` selects equal or older
versions; `--all` covers any version of installed packages.

```sh
dnf5 advisory list --updates --security
dnf5 check-upgrade --minimal --security
```

`upgrade --minimal` chooses the lowest available package versions that fix
advisories; `check-upgrade --minimal` reports those versions. By default,
bugfix, enhancement, security, and new-package advisories participate.
`--security` or `--advisories=ID1,ID2` narrows that selection.

`--contains-pkgs` accepts comma-separated package-name globs and matches
installed packages only. Advisory type and severity filters combine with
OR: `--security --advisory-severities=important` includes all security
advisories and any Important advisories in the selected availability scope.

`--bzs` takes numeric Bugzilla IDs; `--cves` takes CVE IDs. Both accept
comma-separated lists. Install or upgrade fails if a supplied ID has no
matching advisory unless `--skip-unavailable` is passed. Use `--with-bz`
or `--with-cve` to select advisories with any reference of that kind.

Advisory list and info JSON return `[]` for no matches and Unix timestamps for times.
List output uses lowercase keys; info uses capitalized keys such as
`Name`, `Severity`, and `Issued`. Advisory commands suppress error messages
in JSON mode; the reference documents the differing field schemas.

On RHEL 10, use `dnf upgrade-minimal --advisory=ID` for a specific advisory
with the smallest package version change that delivers the fix.

## Configuring automatic security updates

Upstream documents `dnf5-automatic.timer`. Fedora 41+ uses
`dnf-automatic.timer` for all modes and installs `dnf5-plugin-automatic`
under that package name or `dnf-automatic`. Rocky Linux 10 documents
`dnf-automatic` with `dnf-automatic.timer`.

`dnf5 automatic` reads packaged defaults from
`/usr/share/dnf5/dnf5-plugins/automatic.conf`, then overrides from
`/etc/dnf/automatic.conf`. Supply only settings to change; `[base]`
overrides DNF's main configuration for automatic runs.

```ini
[commands]
upgrade_type = security
apply_updates = True
```

`upgrade_type = security` selects updates with an issued security advisory.
The defaults are `download_updates = True` and `apply_updates = False`;
enabling installation also enables downloading. Downloaded-only updates
remain cached until the next successful DNF transaction.

```sh
sudo dnf5 automatic --no-downloadupdates --no-installupdates
sudo dnf5 automatic --downloadupdates --no-installupdates
```

These are notification-only and download-only runs, respectively.
`--installupdates` forces both downloading and installation.
RHEL 10's dedicated download, install, and notify-only timers override
`download_updates` and `apply_updates` in `/etc/dnf/automatic.conf`.

`network_online_timeout` defaults to 60 seconds; `0` skips detection.
`random_sleep` defaults to `0` and applies only with `--timer`; the systemd
timer independently adds up to one hour of random delay by default.
IPv6-only connections can satisfy the network wait starting in 5.4.7.0.

`reboot` defaults to `never`. Use `when-changed` after any applied update
or `when-needed` for changes requiring a reboot. The default reboot command
waits five minutes; `reboot_command = shutdown -r` skips that delay.
The `email` emitter uses `~/.netrc` credentials and requires a libcurl build
with SMTP support. The reference covers all emitters and TLS settings.

## Selecting repositories and controlling vendor changes

`--installed-from-repo` filters by recorded installation origin.
`--from-repo` enables and validates repositories; for `upgrade` and
`distro-sync`, it restricts selection only when package arguments are given.
Dependencies of `upgrade --from-repo` can come from any enabled repository.

```sh
dnf5 repoquery --installed --installed-from-repo=updates
sudo dnf5 upgrade --from-repo=updates bash
```

`upgrade --from-vendor` bypasses vendor-change checks for explicitly
requested packages; dependencies can still be subject to vendor policy.
The `allow_vendor_change` setting applies to upgrades; `downgrade` and
`distro-sync` do not support it. In 5.4.7.0, inspect loaded policies with
`dnf5 --dump-vendor-policies`; per-run selection and exceptions are in the
configuration reference.

`versionlock` affects transactions only: `repoquery`, `list`, and `info`
can still show excluded versions. `versionlock add` prefers matching
installed NEVRAs, falling back to all currently available matches.

## Staging upgrades and recovering transactions

`system-upgrade download` requires the target `--releasever`, applies it to
all enabled repositories, and uses `distro-sync` semantics by default.
Pass `--no-downgrade` to keep newer installed versions.

```sh
sudo dnf5 --refresh upgrade
sudo dnf5 system-upgrade download --releasever=43
sudo dnf5 offline reboot
```

Use `offline status` to inspect staged work and `offline clean` to discard
it and its cached packages. `offline reboot --poweroff` applies the work
and powers off after success; failure still ends in a reboot. In 5.4.7.0,
`offline reboot` waits for shutdown inhibitors and reports waiting progress.

`history store` writes a directory; `replay` requires its `transaction.json`
and privileges. `--ignore-extras` and `--ignore-installed` turn their
respective replay mismatches into warnings. `history redo` takes one
transaction, applies both flags automatically, and reapplies recorded
install reasons to already installed packages.

RHEL 10 does not support system package downgrades through `dnf history undo`
or `dnf history rollback`; returning to an earlier minor release this way
can leave the system inconsistent.

## Automation results and restart checks

`check-upgrade --json` returns an object keyed by CLI output section;
exit `100` means updates are available and `0` means none. DNF5 returns
`2` for argument parsing errors and generally `1` for command errors.

`needs-restarting` exits `1` for a reboot recommendation; `--services`
exits `1` when any systemd unit needs restarting. Both return `0` when no
action is recommended. `--processes` (`-p`) lists PID and command line;
`--exclude-services` omits processes managed by systemd services.

For D-Bus, queue jobs, call `Goal.resolve()`, then `Goal.do_transaction()`.
Resolution results are `0` for clean, `1` for resolved with information or
warnings, and `2` for failure. Session ownership in 5.4.7.0 requires using
the same bus connection that opened the session for subsequent calls.
Drain streamed package-query pipes while the daemon writes: a full pipe
has a 30-second timeout. Check `write_to_fd_finished`; starting in 5.4.8.0,
errors can arrive there, and a transfer ID alone does not establish success.

`ansible.builtin.dnf5` needs `python3-libdnf5` on the module host.
In ansible-core 2.19+, `auto_install_module_deps` defaults to true and
permits an installation attempt if bindings are missing. `security` and
`bugfix` apply with `state: latest` and also constrain dependencies.
The module supports check and diff modes and has no support for `async`.

Files in this skill

  • SKILL.md7.2 KB
  • references/advisory-command.md1001 B
  • references/automation-and-replay.md1.5 KB
  • references/configuration-changes.md2.5 KB
  • references/security-upgrades.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.