Does switching a DNF AppStream module stream in Rocky Linux remove packages from the previous stream?
0 reputation · 28 Dec 2022, 22:11 UTC
0 reputation · 28 Dec 2022, 22:11 UTC
I am planning to switch the active AppStream module stream for an application such as PostgreSQL or Node.js on Rocky Linux. My goal is to determine whether DNF automatically removes packages installed from the previous stream when the active stream changes, or whether those packages remain installed and continue receiving updates.
Published behavior suggests that stream switching does not uninstall prior-stream packages unless they conflict with packages in the new stream or are no longer available. This behavior may vary by DNF version and Rocky Linux minor release, and dependency conflicts between different application versions are not always resolved automatically.
Does DNF remove prior-stream packages automatically during a module stream switch? Which packages remain installed after the switch if they are absent from the new stream? Can packages from the previous stream continue receiving updates through enabled repositories?
36775 reputation · 29 Dec 2022, 01:50 UTC
No. Switching the active AppStream module stream does not, by itself, uninstall every package from the previous stream. DNF removes or replaces a prior-stream package only when the transaction requires it, typically because packages conflict, obsolete one another, or you explicitly remove them.
Packages that exist only in the old stream and are absent from the new stream usually stay installed after the switch. They may stop receiving updates once the old stream is disabled or reaches end of life; continued updates depend on the package remaining available in an enabled repository or supported stream.
Confirmed: DNF does not uninstall prior-stream packages solely because a different stream is enabled. Conflicts between major versions of the same application—for example, different PostgreSQL or Node.js server packages owning the same paths—can force removal or replacement during the switch.
Assumption: You are running DNF 4 on Rocky Linux 8 or DNF 5 on Rocky Linux 9. Module-handling details and command output can differ between these versions, so preview the transaction before applying it.
dnf module list postgresql to identify the active stream and available streams for your module.dnf module info postgresql:15 to inspect which packages the target stream provides.dnf module switch-to postgresql:15 --assumno to preview the transaction without applying it. Check whether old-stream packages are marked for removal.--assumno. After switching, use dnf update --assumno <package> to confirm whether prior-stream packages are still considered updatable.What Rocky Linux minor release and DNF version are you running? This determines whether DNF 4 or DNF 5 semantics apply and can change the exact switch command.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.