DNF Update fails with centos-stream file conflicts

I upgraded my server from CentOS to Rocky a while back, and it has been perfect. I was so impressed with how smooth the upgrade path was. Unfortunately, today when I tried to run a DNF update, I get the following set of errors, which seem to be related to my previous upgrade:

Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘dnf clean packages’.
Error: Transaction test error:
file /etc/centos-release from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /etc/redhat-release from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /etc/rpm/macros.dist from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /etc/system-release from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /etc/system-release-cpe from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /usr/lib/os-release from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /usr/lib/systemd/system-preset/85-display-manager.preset from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /usr/lib/systemd/system-preset/99-default-disable.preset from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch
file /usr/share/redhat-release from install of rocky-release-8.6-2.el8.noarch conflicts with file from package centos-stream-release-8.6-1.el8.noarch

I’ve run DNF update successfully probably 50-75 times since the upgrade. This is the first time I’ve had this issue, presumably because of the release of Rocky 8.6. Can anyone offer any insight?

Thanks!

I would say you need to remove that. If your system is Rocky, this shouldn’t be there.

1 Like

Thanks. I ran a “dnf remove centos-stream-release-8.6-1.el8.noarch” and the dnf update now proceeds without issue.

1 Like