Try running fix
sudo apt install -f
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have 2 updates that could not be installed automatically.
When I try to upgrade with: sudo apt upgrade then I got this message:
The following packages have been kept back: mysql-client mysql-server
So when I try to install it manually like: sudo apt install mysql-client then I got the following message:
The following packages have unmet dependencies: mysql-common : Conflicts: mysql-client-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed Conflicts: mysql-client-core-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
and when I try to install: sudo apt install mysql-server
I got this message:
The following packages have unmet dependencies: mysql-common : Conflicts: mysql-server-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed mysql-community-client : Conflicts: mysql-server-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.31-0ubuntu0.22.04.1) but it is not installable Depends: mysql-server-core-8.0 (= 8.0.31-0ubuntu0.22.04.1) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
It is in a production server and if it's possible do not delete everything and reinstall mysql without losing my settings and/or deleting the database.
@Sinnbeck - Sorry for the late reply but this server is a production server and I had to do some backups first.
I try the command but without luck.
But I was able to solve the problem:
I removed first mysql-community-client wit this command:
sudo apt purge mysql-community-client (without removing the database)
and then I install sudo apt install mysql-server-8.0 and now is everything fine again!
:)
Please or to participate in this conversation.