Use it when adding a repository, or when dnf fails to download metadata or verify signatures.
Repositories · RHEL / Rocky / AlmaLinux
DNF/YUM repositories are defined in .repo files in /etc/yum.repos.d/ with baseurl or metalink, enabled and gpgcheck settings and a gpgkey.
1. dnf repolist -v — repo URL and status.
2. Download errors → URL/proxy/DNS: curl -I <baseurl>.
3. GPG errors → rpm --import <key> from the vendor.
4. RHEL: subscription-manager repos --list-enabled.
5. dnf makecache after fixing.
repo file → metadata downloaded → signatures checked → packages available
For Package Management → RHEL / Rocky / AlmaLinux → Repositories, continue with the first unproven Topic check: Enumerate enabled repository IDs, URLs/metalink/mirrorlist, release/basearch expansion and GPG settings. If that boundary is healthy, advance to the adjacent check: Validate metadata refresh plus certificate/network/entitlement/signature errors independently. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
repo definition + variables/entitlement → DNS/TLS/HTTP access → repomd metadata → GPG trust → package/module metadata → solver origin/priority → NEVRA candidate → RPM transaction
Healthy evidence: enabled repo definitions are intentional, metadata is fresh and trusted, entitlement/access is valid where required and selected package origin matches policy.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Enumerate enabled repository IDs, URLs/metalink/mirrorlist, release/basearch expansion and GPG settings.
- Validate metadata refresh plus certificate/network/entitlement/signature errors independently.
- Inspect exact package NEVRA and repository origin, including modules/excludes/versionlocks where relevant.
- After repo changes, rebuild/refresh metadata deliberately and re-evaluate the candidate transaction before installing.
Verification chain. repo definition + variables/entitlement → DNS/TLS/HTTP access → repomd metadata → GPG trust → package/module metadata → solver origin/priority → NEVRA candidate → RPM transaction
Step 3 Commands Verify boundary
dnf repolist
cat /etc/yum.repos.d/*.repo
dnf config-manager --set-enabled crb
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: stale cache, wrong releasever, disabled base repo, entitlement issue or third-party repo changes package visibility/provenance unexpectedly.
Step 5 Common mistakes Narrow the fault
- Enabling third-party repos without GPG checks.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Keep gpgcheck=1 and import the vendor key. Disable a repo per command with --disablerepo. On RHEL, many repos are managed by subscription-manager — enable them there.
apt policy <pkg> / dnf info <pkg>— installed and candidate versionsdpkg -l <pkg> / rpm -q <pkg>— installed packageapt-cache depends <pkg> / dnf repoquery --requires <pkg>— dependenciesdpkg -S <file> / rpm -qf <file>— package owning a file
ReferenceWhat it is1 section · depth on demand
Core model
Inventory every enabled repo and expansion of releasever/basearch variables. Validate reachability separately from repository metadata and GPG trust. For vendor-managed RHEL, subscription/entitlement can be part of access; Rocky/Alma and third-party repos differ. Correlate repo priority/exclusions and module metadata with the exact selected NEVRA rather than assuming an enabled repo supplied it.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Repository evidence shows configured source, access and metadata/trust conditions, not which candidate ultimately wins or whether installed software works.
In depth
DNF repositories: .repo files and options
Repositories for DNF are defined in .repo files in /etc/yum.repos.d/. Each section is named by a repository ID in brackets. The DNF configuration reference documents the main options:
| Option | Default | Meaning |
|---|---|---|
name | The repo ID | Human-readable name |
baseurl | None | Repository URLs, tried in order |
metalink / mirrorlist | None | URLs listing mirrors |
enabled | True | Whether the repository is used |
gpgcheck | False | Verify package signatures |
gpgkey | — | URLs of the keys to verify with |
priority | 99 | Lower values are preferred |
skip_if_unavailable | False | Continue (and disable the repo) if it can't be reached |
The default for gpgcheck in the reference is False, but distribution and vendor repo files set gpgcheck=1 explicitly. Always keep it enabled for your own repository files too.
A vendor repository file
host$ cat /etc/yum.repos.d/example.repo
[example]
name=Example Agent for EL9
baseurl=https://repo.example.com/el/9/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.example.com/RPM-GPG-KEY-example
repo_gpgcheck=0
priority=50
host$ sudo dnf makecache --repo example
host$ dnf repolist -v example | grep -E "Repo-id|Repo-baseurl|Repo-pkgs"
host$ rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
host$ sudo dnf config-manager --set-disabled example
host$ sudo dnf --disablerepo='*' --enablerepo=baseos list available 'kernel*' | head -3
Variables in repository URLs
| Variable | Expands to |
|---|---|
$basearch | x86_64, aarch64 |
$releasever | The OS release, e.g. 9 |
$arch | The exact architecture |
Local mirrors
| Need | Approach |
|---|---|
| Patch servers without Internet access | Sync repositories with dnf reposync, publish them over HTTP |
| Consistent updates across environments | Snapshots per date (Pulp, Satellite, Foreman) |
| Own packages | createrepo_c on a directory of RPMs |
Priorities
When several repositories offer the same package, a lower priority value wins. That keeps a third-party repository from replacing distribution packages unexpectedly. dnf info pkg shows which repository a candidate comes from.
Documented example, not captured output.
How it works at runtime
Repositories is part of Package Management → RHEL / Rocky / AlmaLinux → Repositories. RHEL-family repositories expose signed RPM metadata and packages through configured repository definitions; baseurl/mirrorlist/metalink, GPG policy, release variables, entitlements and modular metadata can all affect package visibility and selection.
Topic-specific state model. RHEL-family repositories expose signed RPM metadata and packages through configured repository definitions; baseurl/mirrorlist/metalink, GPG policy, release variables, entitlements and modular metadata can all affect package visibility and selection.
Interpretation rule. - Repo reachable ≠ repomd metadata trusted.
- GPG check enabled ≠ package came from intended repository.
- Repository enabled ≠ package selected from it.
- Entitlement/access success ≠ dependency solution or workload health.
Quick reference
RHEL-family repository definition:
# /etc/yum.repos.d/internal.repo
[internal-baseos]
name=Internal BaseOS mirror
baseurl=https://repo.example.com/rhel9/baseos/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify=1
metadata_expire=6h
dnf config-manager --set-enabled crb
dnf repolist -v
reposync --repoid=baseos -p /srv/mirror --download-metadata # build a local mirror
Internal mirrors (Pulp, Satellite, Foreman/Katello, reposync) give controlled, tested package sets per environment.
Limits and how it fails
Primary failure point. Repository evidence shows configured source, access and metadata/trust conditions, not which candidate ultimately wins or whether installed software works.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. RHEL-family Repositories owns repository definitions, metadata access/trust and entitlement/source boundaries. DNF/YUM own selection/solving; network/TLS owns lower transport failures.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Package Management → RHEL / Rocky / AlmaLinux → Repositories. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.debian.org/doc/manuals/debian-reference/ch02.en.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Repositories operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Repositories.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | RHEL-family repositories expose signed RPM metadata and packages through configured repository definitions; baseurl/mirrorlist/metalink, GPG policy, release variables, entitlements and modular metadata can all affect package visibility and selection. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + distribution/release + architecture → identify exact package/version request → enumerate effective repositories/trust → refresh/inspect metadata → compare installed versus candidate/origin → review dependency/conflict transaction → capture package-manager transaction → verify local package database/files/scripts → inspect service/reboot/config effects → repeat original workload test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | repo definition + variables/entitlement → DNS/TLS/HTTP access → repomd metadata → GPG trust → package/module metadata → solver origin/priority → NEVRA candidate → RPM transaction | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Repository evidence proves configured source, access and metadata/trust conditions, not which candidate ultimately wins or whether installed software works. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux package-management evidence can establish this proof path: repo definition + variables/entitlement → DNS/TLS/HTTP access → repomd metadata → GPG trust → package/module metadata → solver origin/priority → NEVRA candidate → RPM transaction | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured repository, solver, transaction, local package database, runtime-side-effect or workload scope. Repository evidence proves configured source, access and metadata/trust conditions, not which candidate ultimately wins or whether installed software works. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: confirm distribution/release and repository trust, inspect candidate/origin and solver policy, correlate the package-manager transaction with dpkg/RPM local state, then test affected services and the original workload before making additional package changes. | Continue to the next unresolved boundary while preserving the original test condition. |
Repositories · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Repositories |
|---|---|
| Topic path | Package Management → RHEL / Rocky / AlmaLinux → Repositories |
| Runtime state | RHEL-family repositories expose signed RPM metadata and packages through configured repository definitions; baseurl/mirrorlist/metalink, GPG policy, release variables, entitlements and modular metadata can all affect package visibility and selection. |
| Fast checks | - Enumerate enabled repository IDs, URLs/metalink/mirrorlist, release/basearch expansion and GPG settings. - Validate metadata refresh plus certificate/network/entitlement/signature errors independently. - Inspect exact package NEVRA and repository origin, including modules/excludes/versionlocks where relevant. - After repo changes, rebuild/refresh metadata deliberately and re-evaluate the candidate transaction before installing. |
| Verification chain | repo definition + variables/entitlement → DNS/TLS/HTTP access → repomd metadata → GPG trust → package/module metadata → solver origin/priority → NEVRA candidate → RPM transaction Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Repository evidence proves configured source, access and metadata/trust conditions, not which candidate ultimately wins or whether installed software works. Boundary chain: repository/metadata → dependency resolution → artifact/signature → package database/file install → scriptlets → service/process reload → effective binary/config → workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |