← Back to list

RHEL 10 Software Management: A Complete Guide to DNF, Repositories, and Flatpak

Master local repos, module streams, and modern application delivery for RHCSA exam success

LinuxCert Guru · 2026-01-17 14:31 · 0 claps · 5.1 min read
#rhel-10 #dnf #repositories #flatpak #rhcsa
Open on Medium ↗
Wiki topics: BIZ · Business Strategy

RHEL 10 Software Management: A Complete Guide to DNF, Repositories, and Flatpak

Master local repos, module streams, and modern application delivery for RHCSA exam success

Red Hat Enterprise Linux 10 brings enhanced software management capabilities that every system administrator needs to master. Whether you’re preparing for the RHCSA exam or managing production systems, understanding DNF package management, repository architecture, and Flatpak integration is essential.

Understanding RHEL 10’s Repository Architecture

RHEL 10 organizes software into distinct repository streams, each serving specific purposes:

BaseOS Repository: Contains core operating system components like the kernel and systemd. These packages receive only security and critical updates, ensuring system stability.

AppStream Repository: Delivers user-space applications and development tools with feature updates and multiple versions through module streams.

CodeReady Builder: Provides additional development libraries and build dependencies aligned with BaseOS updates.

Quick command to check your active repositories:

dnf repolist
dnf repolist --all  # Include disabled repos

Creating Local DNF Repositories

Local repositories are invaluable for offline installations, lab environments, and controlled deployments. Here’s how to create one from a RHEL ISO:

# Create mount point and mount ISO
sudo mkdir -p /mnt/rhel10-iso
sudo mount -o loop /path/to/rhel-10-dvd.iso /mnt/rhel10-iso
# Create permanent repository directory
sudo mkdir -p /var/www/html/repos/rhel10-local
sudo cp -r /mnt/rhel10-iso/* /var/www/html/repos/rhel10-local/
# Install createrepo and generate metadata
sudo dnf install -y createrepo_c
sudo createrepo /var/www/html/repos/rhel10-local/

Now configure DNF to use your local repository:

# Create repository configuration
sudo nano /etc/yum.repos.d/local-rhel10.repo
[rhel10-baseos-local]
name=RHEL 10 BaseOS Local Repository
baseurl=file:///var/www/html/repos/rhel10-local/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel10-appstream-local]
name=RHEL 10 AppStream Local Repository
baseurl=file:///var/www/html/repos/rhel10-local/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Refresh the cache and verify:

sudo dnf clean all
sudo dnf makecache
dnf repolist

Setting Up Network-Accessible Repositories

For multiple systems sharing packages, an HTTP-based repository is more efficient:

# Install and configure Apache
sudo dnf install -y httpd
sudo systemctl enable --now httpd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
# Set permissions for repository directory
sudo chown -R apache:apache /var/www/html/repos
sudo chmod -R 755 /var/www/html/repos
# Create metadata for each repository
sudo createrepo /var/www/html/repos/rhel10/BaseOS
sudo createrepo /var/www/html/repos/rhel10/AppStream

Client systems can then access this repository:

[rhel10-baseos-network]
name=RHEL 10 BaseOS Network Repository
baseurl=http://repo-server.example.com/repos/rhel10/BaseOS
enabled=1
gpgcheck=1

Mastering DNF Module Streams

Module streams are one of RHEL’s most powerful features, allowing multiple versions of applications without system-wide upgrades.

# List available modules
dnf module list
# Show specific module details
dnf module list postgresql
dnf module info postgresql:15
# Install specific stream with profile
sudo dnf module install postgresql:15/server
# Switch to different stream
sudo dnf module reset postgresql
sudo dnf module install postgresql:16/server

Key Concept: Only one stream of a module can be active at a time. Always reset before switching streams to avoid conflicts.

Essential DNF Commands for Daily Use

Here are the commands you’ll use most frequently:

# Package installation and removal
sudo dnf install httpd
sudo dnf remove httpd
sudo dnf autoremove  # Remove orphaned dependencies
# Searching and querying
dnf search nginx
dnf info nginx
dnf provides /usr/sbin/httpd  # Find package owning a file
# Updates and upgrades
dnf check-update
sudo dnf update  # Update all packages
sudo dnf update --security  # Security updates only
# Package groups
dnf group list
sudo dnf group install "Development Tools"
# Transaction history
dnf history
sudo dnf history undo 5  # Rollback transaction

Working with Local RPM Files

Sometimes you need to install packages directly from RPM files:

# Install with dependency resolution (preferred)
sudo dnf install /path/to/package.rpm
# Traditional rpm command (no dependency resolution)
sudo rpm -ivh package.rpm
# Query installed packages
rpm -qa  # List all
rpm -qi httpd  # Show info
rpm -ql httpd  # List files
rpm -qf /usr/sbin/httpd  # Find package owning file
# Verify package integrity
sudo rpm -V httpd
sudo rpm -Va  # Verify all packages

Pro Tip: Always prefer dnf install for local RPMs—it automatically resolves and installs dependencies from configured repositories.

Introduction to Flatpak on RHEL 10

Flatpak provides sandboxed application distribution independent of system libraries, perfect for desktop applications and tools with complex dependencies:

# Install Flatpak
sudo dnf install -y flatpak
# Add Flathub remote (largest Flatpak repository)
flatpak remote-add --if-not-exists flathub \
    https://flathub.org/repo/flathub.flatpakrepo
# Install applications
flatpak install flathub org.mozilla.Firefox
flatpak install flathub org.gimp.GIMP
# List and manage applications
flatpak list
flatpak update
flatpak uninstall org.mozilla.Firefox
# Run applications
flatpak run org.mozilla.Firefox

Flatpak advantages include:

  • Applications run in isolated sandboxes
  • Same package works across distributions
  • Multiple versions can coexist
  • Reduced dependency conflicts

Offline Installation Scenarios

For air-gapped or restricted environments, prepare offline installation media:

# On connected system, download packages with dependencies
mkdir ~/offline-packages
dnf download --resolve --destdir=~/offline-packages httpd
# Create repository metadata
createrepo ~/offline-packages
# Package for transfer
tar czf offline-packages.tar.gz ~/offline-packages
# On offline system, extract and configure
tar xzf offline-packages.tar.gz
sudo nano /etc/yum.repos.d/offline.repo
[offline-repo]
name=Offline Repository
baseurl=file:///home/username/offline-packages
enabled=1
gpgcheck=0
sudo dnf makecache
sudo dnf install httpd

For Flatpak offline installation:

# Create USB repository
flatpak create-usb /mnt/usb/flatpak-offline org.mozilla.Firefox
# On offline system
flatpak remote-add --user usb-repo /mnt/usb/flatpak-offline
flatpak install usb-repo org.mozilla.Firefox

Repository Priority and Management

Control package sources with repository priorities:

# Install plugins
sudo dnf install -y dnf-plugins-core
# Set priority in repository configuration
[local-repo]
priority=1  # Lower number = higher priority (1-99)
[rhel-10-baseos]
priority=10
# Temporarily disable repositories
sudo dnf install httpd --disablerepo=appstream
# Enable specific repository
sudo dnf install package --enablerepo=custom-repo

Troubleshooting Common Issues

DNF metadata problems:

sudo dnf clean all
sudo dnf makecache

Corrupted RPM database:

sudo rpm --rebuilddb

Dependency conflicts:

dnf check
sudo dnf distro-sync

Flatpak issues:

flatpak repair
flatpak override --reset org.mozilla.Firefox
flatpak run --verbose org.mozilla.Firefox

RHCSA Exam Tips

For exam success, master these skills:

  1. Create local repository from ISO in under 5 minutes
  2. Configure both BaseOS and AppStream repositories
  3. Install and switch module streams confidently
  4. Set up HTTP repository server quickly
  5. Handle offline installation scenarios

Time estimates for common tasks:

  • Local repo from ISO: 5–7 minutes
  • HTTP repository setup: 7–10 minutes
  • Module stream configuration: 3–5 minutes
  • Install local RPM: 2 minutes

Practice exercise: Set up a complete environment in 30 minutes including local repository, HTTP server, PostgreSQL module stream, and Flatpak configuration.

Quick Reference

Most-used DNF commands:

dnf repolist                    # List repos
dnf search package              # Search
dnf install package             # Install
dnf remove package              # Remove
dnf update                      # Update all
dnf module list                 # List modules
dnf history                     # Show history
dnf provides /path/file         # Find package

Most-used RPM commands:

rpm -qa                         # List installed
rpm -qi package                 # Show info
rpm -ql package                 # List files
rpm -qf /path/file             # Find owner
rpm -V package                  # Verify

Most-used Flatpak commands:

flatpak remote-add name url     # Add remote
flatpak install remote app      # Install
flatpak list                    # List installed
flatpak update                  # Update all
flatpak run app                 # Run app

Best Practices for Production

  1. Always enable GPG checking for repositories (except trusted local repos)
  2. Test updates in non-production before deploying to production
  3. Maintain local mirrors for critical infrastructure
  4. Use module streams to standardize versions
  5. Schedule regular updates with change management
  6. Monitor disk space for caches and Flatpak apps
  7. Back up RPM database before major changes
  8. Apply security updates promptly using dnf update --security
  9. Audit installed packages regularly to reduce attack surface
  10. Document custom configurations in configuration management

Conclusion

RHEL 10’s software management combines the reliability of DNF with the flexibility of Flatpak, providing administrators with powerful tools for package deployment and application isolation. Master these concepts through hands-on practice, and you’ll be well-prepared for both the RHCSA exam and real-world system administration challenges.

Remember: The key to mastery is consistent practice. Set up a lab environment, create repositories, experiment with module streams, and troubleshoot issues until these operations become second nature.

For more RHCSA exam preparation materials and hands-on labs, visit LinuxCert.Guru


메타데이터
post_id
51fb25dff5ce
slug
rhel-10-software-management-a-complete-guide-to-dnf-repositories-and-flatpak-51fb25dff5ce
url
https://medium.com/@support_23433/rhel-10-software-management-a-complete-guide-to-dnf-repositories-and-flatpak-51fb25dff5ce
canonical_url
https://medium.com/@support_23433/rhel-10-software-management-a-complete-guide-to-dnf-repositories-and-flatpak-51fb25dff5ce
author_url
https://medium.com/@support_23433
status
ok
fetched_at
2026-06-22 08:06:21