Configure RHEL 10 Repositories: BaseOS, AppStream, ISO, EPEL

Enable BaseOS and AppStream on RHEL 10, build a local repo from the DVD ISO, add EPEL 10 with CRB, and fix common dnf repository errors.

Aug 28, 2025 - 12:20
Nov 6, 2026 - 08:46
 0  1.4k
Configure RHEL 10 Repositories: BaseOS, AppStream, ISO, EPEL

A fresh RHEL 10 install has no working repositories until you register it or point DNF at the installation DVD. On a registered system, BaseOS and AppStream are enabled automatically, with no attach step. The short version, run as root:

rhc connect --activation-key=<activation_key> --organization=<organization_ID>
subscription-manager repos --list-enabled
dnf repolist
dnf install -y tree

If you have no subscription or no internet, skip to Method 2 and build a local repository from the DVD ISO. Before this step you should have finished the basic install covered in our beginner's guide to setting up RHEL 10 for the first time.

Key takeaways

  • The RHEL 10 repo IDs are rhel-10-for-x86_64-baseos-rpms and rhel-10-for-x86_64-appstream-rpms. Change x86_64 to aarch64, ppc64le or s390x on other hardware.
  • Registration alone gives you content. RHEL 10 does not use subscription-manager attach, so skip that step from old RHEL 7 or 8 notes.
  • RHEL 10 ships DNF 4. Use dnf config-manager --add-repo, --enable/--disable or --set-enabled/--set-disabled. The Fedora DNF5 syntax (addrepo, setopt as a subcommand) does not apply.
  • For labs and air-gapped servers, mount the full DVD ISO and write a .repo file with two sections, BaseOS and AppStream. Keep gpgcheck=1.
  • EPEL 10 needs CodeReady Linux Builder (CRB) enabled first.
  • Manage Red Hat repos with subscription-manager. Manage your own repos with .repo files or dnf config-manager.

RHEL 10 repositories explained

Red Hat splits RHEL 10 content across a few repositories. You need BaseOS and AppStream on every system. The rest are optional.

RepositoryRepo ID (x86_64)What it containsSupported by Red Hat
BaseOSrhel-10-for-x86_64-baseos-rpmsCore OS: kernel, systemd, core libraries and toolsYes
AppStreamrhel-10-for-x86_64-appstream-rpmsUser-space applications, languages, databases, web serversYes
CodeReady Linux Buildercodeready-builder-for-rhel-10-x86_64-rpmsExtra developer packages, needed by many EPEL packagesNo
SupplementaryCheck with subscription-manager repos --listProprietary-licensed packagesNo
EPEL 10epel (from the epel-release package)Community packages built by the Fedora ProjectNo
Local ISO repoAny ID you chooseBaseOS and AppStream as shipped on the DVD, frozen at that minor releaseSame packages as Red Hat ships

One change from RHEL 8 and 9: modularity is deprecated in RHEL 10 and Red Hat ships no modular content in AppStream. Application Streams come as normal RPMs, so the dnf module commands you may have learnt for RHEL 8 are not part of this setup.

Where repository settings live

  • /etc/yum.repos.d/: one .repo file per source. This is where your own repos go.
  • /etc/yum.repos.d/redhat.repo: generated by subscription-manager. Do not edit it by hand, because RHSM rewrites it.
  • /etc/dnf/dnf.conf: the [main] section with global DNF options. Red Hat recommends keeping custom repos in separate .repo files and not in dnf.conf.

Method 1: Register and enable Red Hat CDN repositories

Step 1: Register the system

Purpose: connect the host to Red Hat so it can download from the CDN. Red Hat recommends the rhc client on RHEL 10. You need an activation key and your organization ID from the Hybrid Cloud Console.

rhc connect --activation-key=<activation_key> --organization=<organization_ID>
rhc status

Expected result: rhc status shows "Connected to Red Hat Subscription Management". By default rhc also turns on Red Hat Lightspeed analytics and remote management. If your policy does not allow remote management, add --disable-feature remote-management to the connect command.

The older subscription-manager method still works and is the one to use with Satellite, which rhc does not support:

subscription-manager register --activationkey=<activation_key_name> --org=<organization_ID>

Expected result: a line starting with "The system has been registered with ID:" followed by a UUID.

For a home lab, the free Red Hat Developer Subscription for Individuals works too. Run subscription-manager register with no options and it asks for your Red Hat login username and password.

Step 2: Skip subscription-manager attach

Many older tutorials tell you to run subscription-manager attach --auto after registering. Red Hat deprecated attach and auto-attach in RHEL 9.5, and they are gone from RHEL 10. With Simple Content Access, registration is enough to get content. If an old script still calls attach, remove that line.

Step 3: Check which repos are enabled

Purpose: confirm that BaseOS and AppStream came on automatically after registration.

subscription-manager repos --list-enabled | grep "^Repo ID"
dnf repolist

Expected result on x86_64:

Repo ID:   rhel-10-for-x86_64-appstream-rpms
Repo ID:   rhel-10-for-x86_64-baseos-rpms

dnf repolist should show the same two IDs with the names "Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)" and "Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)".

Step 4: Enable or disable Red Hat repositories

Purpose: turn individual Red Hat repos on or off. The $(uname -m) part fills in your architecture so the same command works on x86_64 and ARM.

# Enable BaseOS and AppStream if they were disabled
subscription-manager repos --enable rhel-10-for-$(uname -m)-baseos-rpms --enable rhel-10-for-$(uname -m)-appstream-rpms

# Enable CodeReady Linux Builder (needed for EPEL)
subscription-manager repos --enable codeready-builder-for-rhel-10-$(uname -m)-rpms

# Disable a repo you no longer want
subscription-manager repos --disable codeready-builder-for-rhel-10-$(uname -m)-rpms

# See every repo your account can use
subscription-manager repos --list

Expected result: a line such as "Repository 'codeready-builder-for-rhel-10-x86_64-rpms' is enabled for this system." If you mistype an ID, subscription-manager says it does not match a valid repository ID. Copy the ID from the --list output instead of typing it from memory.

Step 5: Lock the system to a minor release (optional)

Purpose: keep a server on one minor version, for example 10.0, when an application vendor certifies only that release.

subscription-manager release --list
subscription-manager release --set 10.0
dnf clean all
subscription-manager release --show

Expected result: release --show prints the version you set. To go back to the latest minor release, run subscription-manager release --unset and then dnf clean all. A locked server stops getting fixes once that minor release is out of support, unless your subscription covers extended support for it, so check your plan before you lock.

Method 2: Create a local repository from the RHEL 10 ISO

This is the method for offline servers, home labs and RHCSA practice. You need the full DVD ISO (rhel-10.x-x86_64-dvd.iso), not the small boot ISO. Use the DVD of the same minor release you installed. The DVD already contains BaseOS and AppStream with their repodata folders, so you do not need createrepo.

Step 1: Mount the ISO

Purpose: make the DVD contents readable at a fixed path. Change the ISO path to wherever you copied the file.

mkdir -p /mnt/rhel10
mount -o loop,ro -t iso9660 /root/rhel-10-x86_64-dvd.iso /mnt/rhel10
ls /mnt/rhel10

Expected result: you see the AppStream and BaseOS directories. If the DVD is in a physical or virtual drive, mount /dev/sr0 instead of the ISO file.

Step 2: Make the mount survive a reboot

Purpose: the repo breaks after a reboot if the ISO is not mounted again.

echo "/root/rhel-10-x86_64-dvd.iso  /mnt/rhel10  iso9660  loop,ro  0 0" >> /etc/fstab
systemctl daemon-reload
mount -a
findmnt /mnt/rhel10

Expected result: findmnt shows the ISO mounted on /mnt/rhel10 and mount -a prints no errors. Always test with mount -a before you reboot. A wrong fstab line can drop the server into emergency mode.

Step 3: Write the .repo file

Purpose: tell DNF where the two repositories are. Each section needs its own ID, and file:/// has three slashes (two for the scheme, one for the root directory).

cat > /etc/yum.repos.d/rhel10-dvd.repo <<'EOF'
[rhel10-dvd-baseos]
name=RHEL 10 DVD - BaseOS
baseurl=file:///mnt/rhel10/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel10-dvd-appstream]
name=RHEL 10 DVD - AppStream
baseurl=file:///mnt/rhel10/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF

Expected result: the file exists and dnf repolist lists both IDs. The Red Hat release key is already on every RHEL system, so signature checks work offline. Keep gpgcheck=1. Turn it off only when an exam task explicitly asks for it.

Step 4: Test the repo

Purpose: prove DNF can read the metadata and install from the DVD.

dnf clean all
dnf repolist
dnf repoinfo rhel10-dvd-baseos
dnf install -y tree

Expected result: repoinfo shows the repo with a package count and a baseurl of file:///mnt/rhel10/BaseOS. The install pulls tree from the DVD. On an unregistered host, DNF also prints a note that the system is not registered. With a working local repo you can ignore that note.

Step 5: Share the ISO repo with other lab machines over HTTP

Purpose: let several lab VMs use one copy of the DVD. This follows the same steps Red Hat documents for a network installation source. Our Apache web server on RHEL 10 guide covers httpd in more depth.

# On the repo server
dnf install -y httpd
mkdir -p /mnt/rhel10-install
mount -o loop,ro -t iso9660 /root/rhel-10-x86_64-dvd.iso /mnt/rhel10-install
cp -r /mnt/rhel10-install/ /var/www/html/
umount /mnt/rhel10-install
restorecon -Rv /var/www/html/rhel10-install
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
systemctl enable --now httpd.service

Expected result: http://<server_IP>/rhel10-install/BaseOS/repodata/repomd.xml opens in a browser or with curl. If you get "403 Forbidden", check file permissions and SELinux labels. The restorecon line resets the labels to what httpd expects, and our SELinux in RHEL 10 guide explains why. For other firewall rules, see RHEL 10 firewalld commands.

On each client, copy the server's key or keep the local one, and use HTTP URLs:

cat > /etc/yum.repos.d/lab-rhel10.repo <<'EOF'
[lab-baseos]
name=Lab RHEL 10 BaseOS
baseurl=http://<server_IP>/rhel10-install/BaseOS
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[lab-appstream]
name=Lab RHEL 10 AppStream
baseurl=http://<server_IP>/rhel10-install/AppStream
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF
dnf repolist

Replace <server_IP> with the real address before saving. DNF does not accept the angle brackets.

Method 3: Add a repository with dnf config-manager

RHEL 10 uses DNF 4 and dnf-plugins-core 4.7.0, so config-manager uses the same option syntax as RHEL 8 and 9. If the command is missing on a minimal install, install dnf-plugins-core first.

Add a repo from a URL

Purpose: create a .repo file from a vendor's published .repo URL or a base URL in one command.

dnf config-manager --add-repo <repository_URL>
ls /etc/yum.repos.d/

Expected result: a new .repo file named after the URL, enabled by default. Open it and check that it has gpgcheck=1 and a gpgkey line. If you gave a plain base URL, DNF writes a minimal file and you should add those two lines yourself.

Enable, disable and inspect repos

Purpose: switch your own repos on or off without opening an editor.

dnf config-manager --set-disabled <repository_ID>
dnf config-manager --set-enabled <repository_ID>
dnf repolist --all
dnf config-manager --dump

Expected result: dnf repolist --all shows the repo as enabled or disabled. Red Hat's RHEL 10 guide also shows the shorter --enable and --disable forms, which do the same job. --dump prints the full [main] configuration, defaults included.

Do not copy DNF5 commands from Fedora 41 or later blogs. dnf config-manager addrepo or dnf config-manager setopt will fail on RHEL 10. For persistent options the DNF 4 form is dnf config-manager --save --setopt=<option>=<value>.

For Red Hat CDN repos, keep using subscription-manager repos. RHSM regenerates redhat.repo, and enabling those IDs through it keeps the system state consistent.

Enable EPEL 10 on RHEL 10

EPEL is a Fedora Project repository of extra packages, such as htop and some monitoring agents. Red Hat does not support it. Many EPEL packages depend on CRB, so enable CRB first.

subscription-manager repos --enable codeready-builder-for-rhel-10-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
dnf repolist

Expected result: dnf repolist now includes the epel repo next to BaseOS, AppStream and CRB. DNF asks you to confirm the EPEL signing key the first time you install a package from it. Read the key fingerprint before you answer yes.

EPEL 10 differs from EPEL 8 and 9 in one way. It keeps a separate repository for each RHEL 10 minor release (10.0, 10.1 and so on), and packages carry a dist tag like .el10_1. The epel-release package sets this up for you, so you install it the same way on every RHEL 10 minor release.

EPEL needs the CDN repos, so it is not an option for a host that uses only the DVD repo.

Manage repositories: priority, exclude and one-time use

Prefer one repo over another with priority

Purpose: when the same package exists in two repos, choose which one wins. The default priority is 99 and the lower number wins. No plugin is needed in DNF 4.

# Add this line inside the repo section of your .repo file
priority=10

Expected result: DNF takes packages from the priority 10 repo even if another repo has a newer version. That is useful for an internal mirror. It can also hold back security updates, so use it with care.

Block packages with excludepkgs

Purpose: stop specific packages from being installed or updated, either from one repo or from all repos.

# In a repo section, or in [main] of /etc/dnf/dnf.conf
excludepkgs=kernel*,httpd

# Ignore the excludes for one command
dnf update --disableexcludes=all

Expected result: dnf update skips the excluded packages. You will also see the shorter exclude= in older files and in Red Hat's own upgrade guide. Red Hat's RHEL 10 DNF guide uses excludepkgs.

To pin one package at its current version, the versionlock plugin is the cleaner option:

dnf install -y python3-dnf-plugin-versionlock
dnf versionlock add httpd
dnf versionlock list

Use a repo for one command only

Purpose: pull a package from a normally disabled repo without changing any file.

dnf install --enablerepo=<repository_ID> <package_name>
dnf update --disablerepo=epel

Expected result: the change applies to that one transaction. dnf repolist afterwards shows the same state as before.

Verify your repository setup

Run these after any change. They catch most mistakes before a real install fails.

dnf clean all
dnf makecache
dnf repolist -v
dnf repoinfo <repository_ID>
rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

dnf repolist -v shows each repo's baseurl, package count and last update time. The last command lists the GPG keys imported into the RPM database, so you can see whether a vendor key is actually present. DNF logs every transaction in /var/log/dnf.log.

Troubleshooting RHEL 10 repository errors

Error or symptomLikely causeFix
"This system is not registered" note, and dnf repolist is emptyHost not registered and no local repoRegister with rhc connect or subscription-manager register, or create the ISO repo from Method 2
"There are no enabled repositories"All repos disabled, or .repo file has enabled=0dnf repolist --all, then enable the right ID
Repo ID "does not match a valid repository ID"Wrong ID such as rhel-10-baseos-rpmssubscription-manager repos --list | grep -i baseos and copy the exact ID
"Failed to download metadata for repo" with "Cannot download repomd.xml"ISO not mounted, wrong baseurl path, missing third slash in file:///, or network, DNS or proxy problemls <baseurl path>/repodata/repomd.xml, remount the ISO, fix the path, then dnf clean all
Curl error (6) "Couldn't resolve host"DNS not workingCheck /etc/resolv.conf and nmcli settings
Curl error (60) SSL certificate problemProxy that inspects TLS, with its CA not trustedCopy the CA to /etc/pki/ca-trust/source/anchors/ and run update-ca-trust
"GPG check FAILED" or "Public key ... is not installed"Key missing or wrong gpgkey= pathFix the gpgkey line or import the key with rpm --import <key_file>. Do not switch to gpgcheck=0
Third-party package signature rejectedRHEL 10 RPM verifies signatures with Sequoia PGP, which rejects some old or weak keysGet the vendor's current key and repo for RHEL 10
subscription-manager does not recognise attachFollowing a RHEL 7 or 8 tutorialSkip the step. Registration is enough on RHEL 10
"Repository ... is listed more than once"Same [repo_id] in two .repo filesRename or delete one section
EPEL install fails with "nothing provides" errorsCRB not enabledEnable codeready-builder-for-rhel-10-$(arch)-rpms and retry
dnf config-manager rejects addrepo or setoptDNF5 syntax used on DNF 4Use --add-repo and --setopt
Local repo ignored, packages still come from CDNSame packages in several repos at equal prioritySet priority= lower on the local repo, or disable the CDN repos
Registration fails behind a corporate proxyproxy= in dnf.conf does not cover RHSMSet the RHSM proxy too: subscription-manager config --server.proxy_hostname=<host> --server.proxy_port=<port>

Security notes for RHEL 10 repositories

  • Keep gpgcheck=1 on every repo, including local ones. A gpgcheck=0 repo will install any RPM placed in it.
  • Add only repos you need. Each extra repo is another source that can replace system packages, so disable trial repos when you finish testing.
  • Prefer HTTPS URLs for third-party repos, and keep vendor keys in /etc/pki/rpm-gpg/.
  • On a shared HTTP repo server, keep the files read-only for the web server and leave SELinux enforcing.
  • Give internal mirrors a lower priority value only if you sync them often. A stale mirror with high priority keeps old, vulnerable packages on your servers.

The wider server baseline is covered in How to Secure RHEL 10: Hardening Best Practices, and repos are one item in our RHEL 10 post-installation checklist. When you manage many servers, put the .repo files in an Ansible role with the ansible.builtin.yum_repository module instead of editing each host by hand. See automating server configuration with Ansible playbooks.

RHCSA exam tips for repository configuration

  • In the exam you usually get a repo URL and must write the .repo file yourself. Practise writing one from memory with name, baseurl, enabled, gpgcheck and gpgkey.
  • Read the task carefully. If it says to use the given key, set gpgkey. If it says signature checking is not needed, gpgcheck=0 is what the grader expects.
  • Always finish with dnf repolist and a test install. A typo in baseurl costs you every later task that needs a package.
  • Repos written in /etc/yum.repos.d/ survive a reboot. Check them after the reboot anyway.

Our RHCSA preparation guide for RHEL 10 lists the other objectives. If you want guided lab practice on these tasks, the RHCSA training runs in our Kharadi, Pune classroom and live online across India. If you are new to Linux, start with Linux administration training.

Official references

Frequently asked questions

Why does dnf repolist show no repositories on a fresh RHEL 10 install?

The system is not registered, so redhat.repo has no usable entries. Register it with rhc connect or subscription-manager register, and BaseOS and AppStream are enabled automatically. Without a subscription, mount the DVD ISO and create a local .repo file.

What are the BaseOS and AppStream repo IDs in RHEL 10?

On x86_64 they are rhel-10-for-x86_64-baseos-rpms and rhel-10-for-x86_64-appstream-rpms. On other hardware, replace x86_64 with aarch64, ppc64le or s390x. The CRB ID follows a different pattern: codeready-builder-for-rhel-10-x86_64-rpms.

Do I still need subscription-manager attach on RHEL 10?

No. attach and auto-attach were deprecated in RHEL 9.5 and removed in RHEL 10. With Simple Content Access, registering the system gives it access to content straight away.

Can I practise on RHEL 10 without a paid subscription?

Yes. Use the full DVD ISO as a local repository, which covers BaseOS and AppStream. You can also register with the free Red Hat Developer Subscription for Individuals to get CDN updates on a small number of lab systems.

How do I install EPEL on RHEL 10?

Enable CRB with subscription-manager repos --enable codeready-builder-for-rhel-10-$(arch)-rpms, then run dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm. Accept the EPEL GPG key when DNF asks for it the first time.

Does RHEL 10 use DNF5?

No. RHEL 10 ships DNF 4 with dnf-plugins-core 4.7.0. Commands like dnf config-manager --add-repo and --set-enabled work. The DNF5 forms from newer Fedora releases, such as dnf config-manager addrepo, do not.

Should I set gpgcheck=0 for a local ISO repository?

No. Point gpgkey at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release and keep gpgcheck=1. The key is already installed on RHEL, so verification works offline. Use gpgcheck=0 only when an exam task asks for it.

How do I make a local repo take priority over the Red Hat CDN?

Add priority=10, or any value below 99, to the local repo's section in its .repo file. DNF picks packages from the repo with the lowest priority number. For a fully offline host, simply disable the CDN repos instead.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.