The error you’re encountering when trying to update Plesk after converting your server from CentOS 8 to AlmaLinux 8, specifically the “Failed to download metadata for repo ‘PLESK_18_0_41-extras'” message, occurs because the Plesk repositories are not properly configured for the new distribution.

Solution:

  1. Clear YUM/DNF cache: First, clean the package manager cache to ensure it is not using outdated information:
    sudo dnf clean all
    sudo rm -rf /var/cache/dnf
  2. Reconfigure Plesk repositories: Download and reconfigure the Plesk repositories specifically for AlmaLinux 8. Use the following command to reconfigure them:
    sudo plesk installer --select-release-current --reinstall-patch --upgrade-installed-components
  3. Update the system: After reconfiguring the repositories, attempt to update Plesk again:
    sudo dnf update
  4. Verify the repositories: Ensure that the Plesk repository is pointing to the correct version for AlmaLinux 8. You can edit the repository files in /etc/yum.repos.d/ if needed.
  5. Contact Plesk support: If the above steps do not resolve the issue, it may be necessary to contact Plesk support for further assistance.
  6. Rename plesk repo: mv /etc/yum.repos.d/plesk.repo /etc/yum.repos.d/plesk.repo.bk