I was having some problem with MariaDb installed on my Debian 8 Jessie. I want to uninstall it and then reinstall it from the scratch. I don’t want to keep any information, settings or configuration on my existing MariaDb installation.
In order to completely remove MariaDb from Debian, you can follow these steps. It works for me.
A. Stop the service
service mysql stop
The command will stop current mysql service on Debian
B. Remove mysql (in this case MariaDb)
apt-get --purge remove "mysql*"
Answer y to confirm the uninstall. Please make sure you have backed up your databases before performing this. All of your database will be removed and un-recoverable. Always make your own backup. During the removal process, you will be asked for some questions.
C. Remove the repository
If you want, you can also remove the MariaDb repository as well. Open the repository file and delete or comment out the related Mariadb repository
The remove or commented the following lines: