After an attempted dist-upgrade, I ended up with:
You might want to run 'apt --fix-broken install' to correct these. The
following packages have unmet dependencies: acl : Depends: libacl1 (=
2.3.1-3) but 2.2.53-4 is to be installed libc-bin : Depends: libc6 (< 2.29) but 2.36-9+rpt2+deb12u8 is to be installed libc-dev-bin : Depends: libc6 (< 2.29) but 2.36-9+rpt2+deb12u8 is to be installed
libc6-dbg : Depends: libc6 (= 2.28-10+rpt2+rpi1+deb10u2) but
2.36-9+rpt2+deb12u8 is to be installed libc6-dev : Depends: libc6 (= 2.28-10+rpt2+rpi1+deb10u2) but 2.36-9+rpt2+deb12u8 is to be installed libnih1 : Depends: libc6 (< 2.29) but 2.36-9+rpt2+deb12u8 is to be
installed locales : Depends: libc-bin (> 2.36) but
2.28-10+rpt2+rpi1+deb10u2 is to be installed openssh-server : Depends: openssh-client (= 1:9.2p1-2+deb12u3) but 1:7.9p1-10+deb10u4
is to be installed
Depends: runit-helper (>= 2.14.0~) but it is not going to be installed
Depends: libcrypt1 (>= 1:4.1.0) but it is not going to be installed
Depends: libselinux1 (>= 3.1~) but 2.8-1+b1 is to be installed
Depends: libssl3 (>= 3.0.13) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install'
with no packages (or specify a solution).
And as for may others apt --fix-broken install did not work. As it is a headless system, removing openssh-server was not an option and I knew messing up libc6 would probably brick the system. So I pulled good old dpkg out of the toolbox. All the .deb files for the upgrade were stored in /var/cache/apt/archives, so I went to that directory and did
dpkg --install openssh-server_1%3a9.2p1-2+deb12u3_armhf.deb openssh-client_1%3a9.2p1-2+deb12u3_armhf.deb runit-helper_2.15.2_all.deb libc6_2.36-9+rpt2+deb12u8_armhf.deb
The filenames are as found in the archives directory. This installed those packages but listed a few other missing dependencies, so I reran the command with those dependencies added. After a few iterations, I seemingly had gotten things working, trying an apt dist-upgrade told me there were still some dependency problems, so I had to a few more dpkg --installs, but in the end, apt could take over again.
Warning: doing wrong things with dpkg can really mess up your system, be sure you really install those versions that are needed.