Reproducer # install a module dnf module install foo # install some optional package from the module dnf install bar # remove the module dnf module remove foo Everything from the module should be removed. For now some packages from the module are not removed.
I would keep packages that are also part of other enabled (explicitly or by default) modules if some of those RPMs were shared.
According to reproducer dnf installs foo:default_stream/default_profile, and removes foo:default_stream/default_profile, not whole stream (every installed profile from the stream). Also it doesn't remove rpm, which was explicitly installed by user (bar in reproducer). This is expected behaviour.
To me the expected behavior would be removing all RPMs owned by that module (unless they're also owned by something else, as noted in comment #1), no matter whether they were installed via a profile or by their name.
(In reply to Petr Šabata from comment #3) > To me the expected behavior would be removing all RPMs owned by that module > (unless they're also owned by something else, as noted in comment #1), no > matter whether they were installed via a profile or by their name. +1 (In reply to Martin Hatina from comment #2) > This is expected behaviour. This is terribly confusing for users.