I'm trying to exclude the MySQL Server 5.6 package from upgrading as part of do-release-upgrade process to Ubuntu 16. I'm running an application that is only compatible with MySQL Server 5.6 but do-release-upgrade is upgrading it to 5.7.

I have excluded all MySQL related packages with apt-mark hold as below:

apt-mark showhold









When I run do-release-upgrade, at some point, I get error that hold prevents these packages from being marked as garbage and then I cannot continue with the upgrade.

Any help would be much appreciated.

1 Answer 1


In short, Ubuntu 16.04 only provides packages for MySQL 5.7. Which means holding version 5.6 will not allow you to upgrade.

The hold you set is doing exactly as it should; which is preventing it from upgrading MySQL to version 5.7. However, it is also holding back your upgrade to Ubuntu 16.04.

During research, I found a link to some information on adding MySQL 5.6 to Ubuntu 16.04: https://makandracards.com/makandra/39899-install-mysql-5-6-in-ubuntu-16-04

Perhaps you can dump your database, remove MySQL, upgrade to 16.04, install MySQL 5.6 using the information linked above, then restore your database? Make sure you have a back up just in-case it doesn't work out.

  • You were right that U16 only provides packages for MySQL 5.7. It turns out that my application supports MySQL 5.7 after all, so I will not have the chance to test your answer. Thank you very much for taking the time to reply anyway and that's exactly what I would have done.
    – aprassas
    Mar 26, 2018 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.