Make sure you have backups! Use it at your own risk!
Remove MariaDB
sudo apt-get remove --purge *mysql\*
Remove the datadir and the configdir
rm -r /etc/mysql && rm -r /var/lib/mysql
Done, now you can install MariaDB if you like.
sudo apt-get install mariadb-server