Upgrade from CentOS 7 to Rocky 8

Whilst trying to upgrade from CentOS 7 Ro Rocky 8 I cannot get past this error;

2024-06-12 09:56:38.888194 [ERROR] Actor: dnf_transaction_check
Message: DNF execution failed with non zero exit code.
PostgreSQL 11 for RHEL / Rocky 8 - x86_64 537 B/s | 146 B 00:00

No matches found for the following disable plugin patterns: subscription-manager
Repository extras is listed more than once in the configuration
Errors during downloading metadata for repository ‘el8-pgdg11’:

We do not need postgressql 11 so how do I stop the program from looking for it?
Is there an exception list that I can add it to?

I have tried commenting it out in the yum.repos.d pgdg-redhat-all.repo file but this does not work?
If I rename the repo to pgdg-redhat-all.repo.old the upgrade will work?
The problem here is it uninstalls postgres?
Thank you in advance for any help.

Rocky doesn’t support upgrades from CentOS 7. Make a clean installation of Rocky 8 and migrate your data from CentOS 7 to the new Rocky 8 server.

We have already done this a couple of times and they have worked.
We have migrated from CentOS 7 to Rocky 8 and then on to Rocky 9
as per this documentation;

Yes you may have done it already and it may have worked, however, Rocky Linux and the Rocky Team do not support upgrades so this statement doesn’t change. You upgrade at your own risk, but Rocky do not support such systems.

@kevinc What @iwalker has told you is 100% true. However, it looks like you have a third-party repo enabled for PostgreSQL. You may have a better result by disabling that repo before attempting another upgrade. In the end, installing a fresh copy of Rocky in this case is ALWAYS preferred. even if you make it through the upgrades and get a working system, you may find things that aren’t quite right after the upgrade.

1 Like

Of course in in-place conversion to a different distro has to remove all CentOS 7 packages and install equivalent Rocky 8 packages. Getting rid of third-party packages before-hand, like postgres, probably solves your “problem”.

When you have Rocky 8, you can install PostgreSQL of your choice.
Rocky 8 has some versions. See dnf module list postgresql
Version 11 isn’t there, so you have to migrate your data – unless you install third-party postgresql 11.

@iwalker , Thanks for the information, but I am able to see a detailed procedure in Migrating To Rocky Linux - Documentation about how to migrate from Centos to Rockylinux. Can you support your statement that RockyLinux doesn’t support from from CentOs. It will be very helpful for us.



The documentation clearly states versions 8 and 9. There is no mention of CentOS 7. These scripts are designed to migrate from one derivative to another of the same major version, such as RHEL 8 to Rocky Linux 8, or Oracle Linux 9 to Rocky Linux 9.

You are recommended to stand up new Rocky Linux systems and plan your migration that way.

1 Like

Hi @nazunalika, Thanks for the clarification. With this being said, if there are any issues that we confront after migrating from Cent OS 8 / RedHat EL 8 to Rocky Linux 8 or Cent OS 9/RedHat EL 9 to Rocky Linux 9, will we have support from your team to fix them?

There is no “support team”. You will get community support here at these forums or our mattermost.

As already explained, we don’t support upgrades. So there are no guarantees whatsoever. Especially from CentOS 7. As has already been suggested - clean install and migrate your applications.

Problem Solved.
I disabled the PostgreSQL 11 repo from within the LEAPP directory repo file.
We have now upgraded 4 servers from CentOS 7 using this method.

@kevinc may I know how you solved the issue(how to “disabled the PG11 repo”), because I have same issue now

cd /etc/leapp/files/vendors.d

vi vi postgresql.repo

At the bottom of the file comment out as below.

#name=PostgreSQL 11 for RHEL / Rocky 8 - $basearch

It would be easier to just change:


no need to comment out the entire file.