Rocky Linux 9: On-Demand Package Installation with AppStream and DNF5
Learn how Rocky Linux 9's AppStream and BaseOS split and DNF5 solver let you install only what you need, speed up dependency resolution, and avoid RHEL subscription costs.
31 Oct 2025, 14:01 UTC

The AppStream–BaseOS split in Rocky Linux 9
On Rocky Linux 9 the default repositories are split into AppStream and BaseOS. AppStream delivers pre-built dependency-resolved binary packages for applications containers and development workloads. BaseOS holds the foundational system RPMs the kernel init system and essential utilities that constitute the core operating system. This division exists so administrators can enable only the metadata subsets they actually need reducing repository overhead and avoiding unnecessary dependency resolution.
DNF5's modular solver
Rocky Linux 9 defaults to DNF5 the next-generation package solver. DNF5 offers faster dependency resolution an improved plugin architecture and better support for modular streams compared to DNF4. When combined with the AppStream/BaseOS split DNF5 can target specific streams and enabled repositories meaning you don't pay the cost of scanning irrelevant metadata during installation or updates.
Worked example: installing a module stream on demand
Imagine you need the Node.js 20 stream from AppStream without pulling in unrelated development tools. As root (or with sudo) run:
# Check which module streams are available
dnf5 module list nodejs
# Enable only the desired stream
dnf5 module enable nodejs:20
# Install the package from that stream
dnf5 install nodejsWhere to run: Any Rocky Linux 9 system with DNF5 (default since release). Required permissions: Root or sudo. Meaningful placeholders: Replace nodejs:20 with the package and stream relevant to your workload. Expected checks: After installation verify the version with node --version and confirm the active stream with dnf5 module list nodejs. Relevant risks: Enabling a stream may pull in additional dependencies from BaseOS that were not part of the original intent; always review the transaction summary before confirming.
Verifying repository state
To confirm AppStream and BaseOS are correctly enabled and configured run:
dnf5 repolist all | grep -E 'appstream|baseos'Expected output lists both repository groups with enabled metadata. You can also inspect /etc/dnf/dnf.conf for metadata_expire and enabled settings or examine individual .repo files under /etc/yum.repos.d/.
Trade-offs and limitations
Not every package available in BaseOS has an AppStream equivalent and some system-level utilities such as certain partition or init scripts remain BaseOS-only. Shifting a workload to AppStream-only may require manual dependency mapping. Additionally DNF5 is newer than DNF4 while stable some third-party plugins or custom repository configurations may need adjustment. Always test module changes on a non-production host first.
Actionable closing
To start reducing repository noise and speeding up package operations on Rocky Linux 9 check which repositories are currently enabled:
dnf5 repolist all | grep -E 'appstream|baseos'Then enable only the module streams your services actually use. This keeps your system lean avoids unnecessary dependency resolution and eliminates the need for an RHEL subscription for identical software.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.