AlmaLinux 9 DNF Module Streams: Decision Guide and nodejs:18 Implementation
How to decide between default packages, module streams, and third‑party repos on AlmaLinux 9, with a concrete nodejs:18 enablement and validation steps.
30 Sept 2025, 11:08 UTC

The decision: default packages, module streams, or third‑party repos
\nYou need Node.js 18 on AlmaLinux 9, but the default AppStream package ships Node.js 12. You have three realistic options: accept the default version, enable a DNF module stream, or add a third‑party repository such as nodesource. This guide helps you pick, then shows a concrete implementation and validation for the stream option.
\n| Option | \nSupport & updates | \nVersion flexibility | \nRisk | \n
|---|---|---|---|
| Default AppStream packages | \nFull AlmaLinux security updates for the OS lifecycle | \nNone — one version per name | \nLowest | \n
| DNF module streams | \nUpdated alongside the base OS from official mirrors | \nSeveral curated streams per application | \nModerate — stream switches can break dependencies | \n
| Third‑party repos | \nVendor‑dependent; no AlmaLinux guarantee | \nWidest (latest upstream releases) | \nHigher — metadata conflicts, supply‑chain risk | \n
Constraints to understand before enabling a stream
\n- \n
- One stream per name, system‑wide. Enabling nodejs:18 replaces what nodejs resolves to for every package and dependency on the host. You cannot run nodejs:16 and nodejs:18 side by side via modules (use containers for that). \n
- Switching streams is not a clean upgrade. Changing from one enabled stream to another after packages are installed can leave mismatched dependencies. Reset first (dnf module reset nodejs) or, ideally, pick the stream on a fresh system. \n
- Third‑party repos may lack modular metadata. Mixing them with streams can cause dependency resolution failures. Disable conflicting repos before enabling a stream. \n
- Streams have their own lifecycles. A stream can reach end‑of‑life before the OS does; check the stream’s support window before standardizing on it. \n
Implementation: enabling nodejs:18
\nRun the following commands as root (or via sudo) on the AlmaLinux 9 host.
\ndnf module list nodejs\nYou should see entries like nodejs 18 [e] or nodejs 20 with a hint column marking the default ([d]).
Enable and install the 18 stream:
\ndnf module enable nodejs:18 -y\ndnf module install nodejs:18 -y\nOn a fresh system you can combine these into dnf module install nodejs:18, which enables the stream implicitly. If a different stream was previously enabled, reset first:
dnf module reset nodejs -y\ndnf module install nodejs:18 -y\nBe aware that resetting and reinstalling may remove dependent packages; review the transaction summary DNF prints before confirming.
\nValidation
\n- \n
- Stream state:
dnf module list --enabledshould shownodejs 18 [e]. \n - Installed version:
node --versionshould reportv18.x. If it reports another major version, a conflicting repo likely supplied the package — checkdnf info nodejsfor the From repo field. \n - Update path:
dnf update --refreshshould offer only nodejs 18.x updates, not a jump to another major version. \n
Limitations
\nExact stream availability varies by AlmaLinux 9 minor release and mirror sync state, so verify with dnf module list on your own system rather than assuming a stream exists. Streams also do not help with software AlmaLinux does not package at all. For per‑project version isolation, containers (Podman is included) are a better fit than modules.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.