Until yesterday I had mariadb 10.6 running on my system
(bookworm/sid). It was behaving strangely, so I decided to stop it,
uninstall it, remove all databases during uninstall (it's a developer
system, so no real data to save there) and install it again.
Before reinstalling it, I checked that /var/lib/mysql did not exist
anymore. I even manually removed /etc/mysql along with all the
contained files and purged dbconfig-common (just in case it matters),
then I rebooted the system and finally I installed mariadb-server with
its dependencies using aptitude. Installation went through without
errors, but it did not ask me to set a password for the mariadb root
user (maybe that's ok, I'm not sure).