Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common?

You can’t only skip bullseye migration. You have to complete the upgrade yourself.

I had the same error this morning and I solved it in this forum post : Mise à jour vers Debian 11, deuxième serveur .

In quick explain :

$ sudo apt update

$ sudo apt full-upgrade

$ sudo apt autoremove

$ sudo apt update

$ sudo apt full-upgrade

I don’t know why I had to update/full-upgrade two times. After the first round, there was still some upgrade to do (guile-2.2-libs, moulinette/stable 11.0.9, ssowat/stable 11.0.9, yunohost-admin/stable 11.0.10 and yunohost/stable 11.0.9.14).

After that, I could launch the last upgrade parts via the webadmin. (You can do it from CLI too).