English
In general, to remove a module installed on your system, use the following command:
$ dnf module remove MODULE:STREAM/PROFILE
Advanced
There is a situation when a specific package has been installed first, and then a module has been installed after that. Example:
$ dnf install ruby
$ dnf module install ruby:2.6/default
In this case, running the `dnf module remove` command would not remove the `ruby` package, as DNF remembers that package has been explicitly installed.
To make the `ruby` package uninstalled with the `dnf module remove` command, run the following:
$ dnf mark group ruby
$ dnf module remove ruby:2.6/default
That is because DNF remembers a reason why a package has been installed. There are three, sorted from the strongest:
__user__
__group__
__dependency__
Because modules use the __group__ reason, which is weaker than __user__ used by the `dnf install` command, the package stays on the system after running the `dnf module remove` command. "Downgrading" it to __group__, however, makes the `dnf module remove` remove it as well.
Modular filtering and conflicts
When consuming module streams a lot of operations are being executed. A module stream contains alternative modular RPM packages which can have the same name as already existing non-modular RPM packages, a lot of conflicts can arise. In the next few examples we will show you some of the conflicts.
Switching a module stream without removing the RPM packages from the old module stream
broken dependencies when switching module streams without removing the installed content
[root@5e7d134a8883 /]# dnf module install nodejs:14/common
Last metadata expiration check: 0:02:38 ago on Thu Mar 3 08:57:00 2022.
Dependencies resolved.
Problem 1: cannot install the best candidate for the job
- nothing provides /usr/bin/pwsh needed by nodejs-1:14.19.0-2.module_f35+13766+ad18d3e5.x86_64
Problem 2: package npm-1:6.14.16-1.14.19.0.2.module_f35+13766+ad18d3e5.x86_64 requires nodejs = 1:14.19.0-2.module_f35+13766+ad18d3e5, but none of the providers can be installed
- cannot install the best candidate for the job
- nothing provides /usr/bin/pwsh needed by nodejs-1:14.19.0-2.module_f35+13766+ad18d3e5.x86_64
===========================================================================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================================================================
Upgrading:
nodejs x86_64 1:14.17.2-2.module_f35+12348+fe4be0bd fedora-modular 93 k
nodejs-docs noarch 1:14.17.2-2.module_f35+12348+fe4be0bd fedora-modular 6.0 M
nodejs-full-i18n x86_64 1:14.17.2-2.module_f35+12348+fe4be0bd fedora-modular 7.8 M
nodejs-libs x86_64 1:14.17.2-2.module_f35+12348+fe4be0bd fedora-modular 13 M
Downgrading:
npm x86_64 1:6.14.13-1.14.17.2.2.module_f35+12348+fe4be0bd fedora-modular 3.3 M
Installing module profiles:
nodejs/common
Skipping packages with broken dependencies:
nodejs x86_64 1:14.19.0-2.module_f35+13766+ad18d3e5 updates-modular 199 k
npm x86_64 1:6.14.16-1.14.19.0.2.module_f35+13766+ad18d3e5 updates-modular 3.3 M
Transaction Summary
===========================================================================================================================================================================
Upgrade 4 Packages
Downgrade 1 Package
Skip 2 Packages