I know it is not a preferred action, but for a distupgrade from bionic to focal (and later to jammy) I have to install a package from focal to bionic first. This is because I have an additional source (packages.matrix.org). To do a do-release-upgrade I must upgrade to the latest Matrix, with needs packages from focal.
When I try to install the required deb file from the command line (downloaded from packages.ubuntu.com), apt want to uninstall essential packages:
$ sudo apt --simulate --ignore-missing install ./libsystemd0_245.4-4ubuntu3.20_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libsystemd0' instead of './libsystemd0_245.4-4ubuntu3.20_amd64.deb'
The following packages will be REMOVED:
dbus-user-session docker-ce-rootless-extras friendly-recovery init libnss-systemd libpam-systemd plymouth plymouth-theme-ubuntu-text snapd systemd systemd-sysv ubuntu-standard
The following packages will be upgraded:
libsystemd0
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
init systemd-sysv (due to init)
1 upgraded, 0 newly installed, 12 to remove and 1 not upgraded.
How can I solve this problem until the dist-upgrade is executed?