first stop mariadb service
sudo service mysql stop
then
sudo apt-get --purge remove "mysql*" # this will delete all database , make backup of your db's
source :: как удалить mariadb полностью