Skip to content

carapace-sh/carapace-bin / skills/dnf5

Use 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".

FileKindSize
SKILL.mdskill md9.1 KB
references/aliases.mdmarkdown4.6 KB
references/build.mdmarkdown6.1 KB
references/caching.mdmarkdown4.6 KB
references/cli.mdmarkdown8.1 KB
references/comps.mdmarkdown1.7 KB
references/configuration.mdmarkdown15.7 KB
references/daemon.mdmarkdown13.4 KB
references/filtering.mdmarkdown2.2 KB
references/forcearch.mdmarkdown1.5 KB
references/installroot.mdmarkdown2.5 KB
references/libdnf5.mdmarkdown7.0 KB
references/migration.mdmarkdown8.5 KB
references/modularity.mdmarkdown4.1 KB
references/plugins.mdmarkdown16.2 KB
references/repo-variables.mdmarkdown2.4 KB
references/specs.mdmarkdown4.2 KB
references/system-state.mdmarkdown2.0 KB
references/workflow.mdmarkdown7.5 KB

references/caching.md

View on GitHub
# DNF5 Caching

How DNF5 caches metadata and packages, the cache directory structure, metadata types, and cache management.

> **Source of truth**: <https://dnf5.readthedocs.io/en/stable/misc/caching.7.html>. For configuration options, see [configuration.md](configuration.md).

## Cache Directory Location

| User | Default Path | Config Option |
|------|-------------|----------------|
| Regular user | `~/.cache/libdnf5/` | `cachedir` |
| Superuser (root) | `/var/cache/libdnf5/` | `system_cachedir` (overwrites `cachedir`) |

## Cache Directory Structure

```
/var/cache/libdnf5/
├── fedora-*
│   ├── metalink.xml
│   ├── repodata/
│   │   ├── *-comps-Everything.x86_64.xml
│   │   ├── *-primary.xml.zck
│   │   └── repomd.xml
│   └── solv/
│       ├── fedora-group.solvx
│       └── fedora.solv
├── temporary_files.toml
└── updates-*
    ├── metalink.xml
    ├── packages/
    │   └── bash-5.2.21-1.fc38.x86_64.rpm
    ├── repodata/
    │   ├── *-primary.xml.zck
    │   ├── *-updateinfo.xml.zck
    │   ├── *-comps-Everything.x86_64.xml.gz
    │   └── repomd.xml
    └── solv/
        ├── updates-group.solvx
        ├── updates-updateinfo.solvx
        └── updates.solv
```

### Subdirectory Contents

| Subdirectory | Description |
|--------------|-------------|
| `repodata/` | Metadata files downloaded from the repository |
| `solv/` | Solver-generated cached files (libsolv format, for performance). Controlled by `build_cache` config option. |
| `packages/` | Downloaded RPM packages (if `keepcache=True`) |
| `metalink.xml` / `mirrorlist` | Information on remote locations of repository data |
| `temporary_files.toml` | Tracking file for temporarily stored packages |

## Metadata Types

### Mandatory Metadata (always loaded)

| Type | Description |
|------|-------------|
| `repomd.xml` | Info about specific metadata type files (checksums, file sizes, locations) |
| `primary` | Detailed package info (names, versions, dependencies, etc.) |
| `modules` | Module metadata (if compiled with `WITH_MODULEMD`) |

### Optional Metadata Types

Loaded via `optional_metadata_types` config option, automatically during runtime, or on explicit user request:

| Type | Description |
|------|-------------|
| `comps` | Package groups and environment descriptions |
| `filelists` | All files provided by packages (loaded when user passes a filepath argument) |
| `updateinfo` | Security-related updates and advisories |
| `presto` | Delta RPM information |
| `other` | Additional metadata (e.g., changelogs) |

If required metadata is missing, results can include: empty query, error output for no match, or transaction error.

## Package Caching

| Setting | Behavior |
|---------|----------|
| `keepcache=False` (default) | Downloaded packages are tracked in `temporary_files.toml` and removed after the next successful transaction (only if transaction contains inbound actions). |
| `keepcache=True` | Downloaded files are not tracked and persist until manually removed or via `dnf5 clean packages`. |
| `download` command | Packages downloaded via `dnf5 download` are always retained regardless of `keepcache`. |

## Sharing Root Cache Among Users

When running as non-root, DNF5 first checks the root's cache location. If metadata is present there, it is **copied** to the user cache location. This cloning is optimized when copy-on-write functionality is present (e.g., btrfs).

## Cacheonly

| Setting | Description |
|---------|-------------|
| `cacheonly=all` | Run entirely from system cache. No downloads. |
| `cacheonly=metadata` | Use only cached metadata. Packages can still be downloaded. Useful when optional repos are temporarily unavailable or cached metadata is expired but still functional. |
| `cacheonly=none` (default) | Normal operation. |
| `--cacheonly` / `-C` | Sets `cacheonly=all` (fully cache-driven operation). |

## Cache Management Commands

| Command/Option | Description |
|---------------|-------------|
| `dnf5 clean all` | Clean all cached data |
| `dnf5 clean packages` | Remove cached packages |
| `dnf5 clean metadata` | Remove cached metadata |
| `dnf5 makecache` | Generate metadata cache |
| `--refresh` | Force metadata update before executing a command |

## Metadata Expiration

The `metadata_expire` configuration option determines whether local repo data is due for re-sync. Default: 48 hours. Values: time in seconds, `-1` or `never` for no expiration.

Commands where up-to-date metadata is not critical (e.g., `group list`) use whatever version is locally available, ignoring expiration.
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall
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: 108kUpdated Claude CodeCodexVerifiedInstall
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: 108kUpdated Claude CodeCodexVerifiedInstall