Ubuntu is not supported by our licensing system, but the control panel licences may work in some environments for a limited time. If the server is fresh or have limited amount of data, It's recommended to re-install the OS as Almalinux 8.9. It will help to keep your services smooth and not disturbed by the unsupported OS conflictions.
Here's a solution, But there's no guarantee if it will work for a longer time, shifting to the supported OS as soon as possible will be the best option:
Execute them one-by-one:
rm -rf /usr/bin/RcLicense_plesk
rm -rf /usr/bin/RcLicensePlesk
rm -rf /usr/bin/RcLicense_Plesk
rm -rf /etc/cron.d/rcplesk
rm -rf /etc/cron.d/rcpleskbackup
rm -rf /etc/sw/keys/keys
Then update your OS:
sudo apt update && sudo apt upgrade
And resolve any internal issues with Plesk:
plesk repair all -y
And at last, refresh your license by this command:
tslzPlesk
It will regenerate your Plesk key and you will be able to access the dashboard again