Managing Software Modules with DNF command in Linux

DNF supports managing software modules, which provide a way to deliver a set of software packages and updates on different lifecycles and with varying stability.

To list available modules, use the following command:

# dnf module list

For example

# dnf module list
Last metadata expiration check: 0:33:31 ago on Mon Aug 14 17:10:38 2023.
AlmaLinux 9 - AppStream
Name       Stream  Profiles                           Summary
maven      3.8     common [d]                         Java project management and project comprehension tool
nginx      1.22    common [d]                         nginx webserver
nodejs     18      common [d], development, minimal,  Javascript runtime
php        8.1 [e] common [d], devel, minimal         PHP scripting language
postgresql 15      client, server                     PostgreSQL server and client module
ruby       3.1     common [d]                         An interpreter of object-oriented scripting language

AlmaLinux 9 - CRB
Name       Stream  Profiles                           Summary
swig       4.1     common [d], complete               Connects C/C++/Objective C to some high-level programming languag

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

This command will display a list of all available modules, including their names, stream versions, and descriptions. Modules often represent different software stacks, language versions, or application variants.

To enable a specific module stream, you can use the following command:

# sudo dnf module enable module-name:stream-version

For example, to enable the "php" module with stream version "8.1", you'd use:

# sudo dnf module enable php:8.1

To disable a module, use the following command:

# sudo dnf module disable module-name

For example, to disable the "php" module, use:

# sudo dnf module disable php

Disabling a module stops DNF from installing packages from that module.


With the ability to manage software modules, DNF provides a flexible way to handle different software stacks and updates on your RPM-based Linux distribution. By understanding how to list, enable, and disable modules, you can effectively manage the software packages that you need while maintaining system stability.

================================================================================== Was this article of use to you? Post your insightful thoughts or recommendations in the comments section if you don't find this article to be helpful or if you see any outdated information, a problem, or a typo to help this article better. ==================================================================================


I love keeping up with the latest tech trends and emerging technologies like Linux, Azure, AWS, GCP, and other cutting-edge systems. With experience working with various technology tools and platforms, I enjoy sharing my knowledge through writing. I have a talent for simplifying complex technical concepts to make my articles accessible to all readers. Always looking for fresh ideas, I enjoy the challenge of presenting technical information in engaging ways. My ultimate aim is to help readers stay informed and empowered on their tech journeys.

Post a Comment

Previous Post Next Post

Contact Form