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/specs.md
View on GitHub# DNF5 Package Specs
Pattern matching rules for package, group, environment, module, and transaction specifications in DNF5.
> **Source of truth**: <https://dnf5.readthedocs.io/en/stable/misc/specs.7.html>.
## Globs
DNF5 supports the same glob pattern matching as the shell:
| Pattern | Matches |
|---------|---------|
| `*` | Any number of characters |
| `?` | Any single character |
| `[abc]` | Any one of the enclosed characters |
| `[a-z]` | Any character in the range |
| `[!abc]` or `[^abc]` | Any character NOT enclosed |
**Note**: Curly brackets `{}` are **not supported** by DNF5. Shells that support them can expand them before DNF5 sees the argument.
## Package Specs
Many commands take a `<package-spec>` parameter. Matching is tried sequentially against:
1. **NEVRA** [N] or case-insensitive NEVRA [NI]
2. **Provides** [P]
3. **File provides** [F]
4. **Binaries** [B]
For `<package-spec-NP>`, matching is first against NEVRAs, then Provides (if no NEVRA match).
### NEVRA Matching
Each package is uniquely identified by NEVRA:
| Component | Description |
|-----------|-------------|
| **Name** | Package name |
| **Epoch** | Epoch number (not always included). Overrides other version checking. |
| **Version** | Version string (not strictly numeric, matches upstream software version) |
| **Release** | Edition string (particular package build, usually a number) |
| **Architecture** | Target processor type. Can be `src` (source) or `noarch` (architecture-independent). |
### Partial Matching
DNF5 tries the spec against these forms in decreasing priority:
1. `NAME-[EPOCH:]VERSION-RELEASE.ARCH`
2. `NAME.ARCH`
3. `NAME`
4. `NAME-[EPOCH:]VERSION-RELEASE`
5. `NAME-[EPOCH:]VERSION`
The first form that matches any packages is used; remaining forms are not tried. If none match, an attempt is made to match against full package NEVRAs (relevant if globs are present).
Globs can be specified as part of any NEVRA component, or across multiple NEVRA components (matching across separators like `-` and `.`). In the latter case, the spec must match against full package NEVRAs.
### Provides Matching
Users can specify version comparisons for provides:
```
<provide>
<provide> = <version>
<provide> > <version>
<provide> >= <version>
<provide> < <version>
<provide> <= <version>
```
Rich dependency expressions (boolean operators, nesting) are supported:
```
(<provide1> or (<provide2> and <provide3>))
```
### File Provides Matching
If a spec starts with `/` or `*/`, it is considered a potential file provide. DNF5 checks if any package provides that file.
### Binaries Matching
DNF5 checks if the given spec is a binary in `/usr/bin/` or `/usr/sbin/`.
## Comps Specs
`<group-spec>` and `<environment-spec>` are case-insensitive strings (supporting globs) matched against:
- Group's/environment's **ID**
- Group's/environment's **canonical name**
- Group's/environment's **name** translated into the current `LC_MESSAGES` locale
Comps specs are prefixed by `@` for commands that also accept package specs. Group and environment commands prefer their corresponding type; other commands affect both types.
## Module Specs
`<module-spec>` identifies modules/profiles via the **NSVCA** format:
```
NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE
```
### Supported Partial Forms
- `NAME`
- `NAME:STREAM`
- `NAME:STREAM:VERSION`
- `NAME:STREAM:VERSION:CONTEXT`
- All above with `::ARCH` (e.g., `NAME::ARCH`)
- `NAME:STREAM:VERSION:CONTEXT:ARCH`
- All above with `/PROFILE` (e.g., `NAME/PROFILE`)
### Defaults
- If **stream** is not specified, the enabled or default stream is used (in that order).
- If **profile** is not specified, the system default profile or 'default' profile is used.
## Transaction Specs
`<transaction-spec>` can be:
| Spec | Description |
|------|-------------|
| Integer | Specifies a transaction ID |
| `last` | Same as the ID of the most recent transaction |
| `last-<offset>` | Where `<offset>` is a positive integer, specifying the offset-th transaction preceding the most recent |
### Examples
- `dnf5 history info 42` — Show info for transaction #42
- `dnf5 history info last` — Show info for the most recent transaction
- `dnf5 history info last-1` — Show info for the transaction before the most recent
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 |