uninstall mariadb server and client in ubuntu 18.4

Shell
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql/
sudo rm -rf /etc/mysql/
sudo systemctl stop mysql
sudo apt-get remove --purge mysql-server mysql-client mysql-common

Source

Also in Shell: