How to Completely Delete MariaDB Server 10.3v on Ubuntu 19.04

To Completely Deleting MariaDb from ubuntu 19.04

Procedure to Deleting MariaDb

Let's check the status and version of MariaDB by executing the following command.

root@linuxhelp:~# systemctl status mariadb
● mariadb.service - MariaDB 10.3.13 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-05-16 16:39:01 IST; 1 weeks 5 days ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/

Remove the MariaDB package from the system using the purge command.

root@linuxhelp:~# apt purge "mariadb*" -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mariadb-rocksdb-engine-10.2' for glob 'mariadb*'
Note, selecting 'mariadb-rocksdb-engine-10.3' for glob 'mariadb*'
Note, selecting 'mariadb-test' for glob 'mariadb*'
Note, selecting 'mariadb-test-data-10.0' for glob 'mariadb*'
Note, selecting 'mariadb-test-data' for glob 'mariadb*'
Note, selecting 'mariadb-plugin-cracklib-password-check' for glob 'mariadb*'
Note, selecting 'mariadb-test-5.5' for glob 'mariadb*'
Note, selecting 'mariadb-common' for glob 'mariadb*'
Note, selecting 'mariadb-plugin-connect' for glob 'mariadb*'
Note, selecting 'mariadb-server-core-5.5' for glob 'mariadb*'
Note, selecting 'mariadb-server-5.1' for glob 'mariadb*'
Note, selecting 'mariadb-server-5.2' for glob 'mariadb*'
Note, selecting 'mariadb-server-5.3' for glob 'mariadb*'
Note, selecting 'mariadb-server-5.5' for glob 'mariadb*'
Note, selecting 'mariadb-tokudb-engine-5.5' for glob 'mariadb*'
Note, selecting 'mariadb-server-core-10.0' for glob 'mariadb*'
Note, selecting 'mariadb-server-core-10.1' for glob 'mariadb*'
Note, selecting 'mariadb-server-core-10.2' for glob 'mariadb*'
Note, selecting 'mariadb-server-core-10.3' for glob 'mariadb*'
Note, selecting 'mariadb-connect-engine-10.0' for glob 'mariadb*'
Note, selecting 'mariadb-connect-engine-10.1' for glob 'mariadb*'
Note, selecting 'mariadb-galera-server' for glob 'mariadb*'
.
**Select yes to remove all the MariaDB databases from the system**
![snap1](https://assets.linuxhelp.com/scr/95125185449afc298a6e4b9dd7b0b59a.png)
.
.
.
Purging configuration files for mariadb-server-10.3 (1:10.3.13-2) ...
Processing triggers for systemd (240-6ubuntu5) ...

Run the autoremove command to completely delete the configuration files.

root@linuxhelp:~# apt autoremove -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  galera-3 libaio1 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libreadline5 libterm-readkey-perl socat
0 upgraded, 0 newly installed, 8 to remove and 93 not upgraded.
After this operation, 6,789 kB disk space will be freed.
(Reading database ... 145868 files and directories currently installed.)
Removing galera-3 (25.3.25-1) ...
Removing libaio1:amd64 (0.3.111-1) ...
Removing libconfig-inifiles-perl (3.000001-1) ...
Removing libdbd-mysql-perl:amd64 (4.050-2) ...
Removing libdbi-perl:amd64 (1.642-1) ...
Removing libreadline5:amd64 (5.2+dfsg-3build2) ...
Removing libterm-readkey-perl (2.38-1) ...
Removing socat (1.7.3.2-2ubuntu2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...

Check the status of MariaDB service.

root@linuxhelp:~# systemctl status mariadb
Unit mariadb.service could not be found.

With this, the method to delete the MariaDB server package on ubuntu 19.04 comes to end.

Tag : MariaDB Ubuntu
FAQ
Q
What is Purge in MariaDB?
A
Data purging is deleting the data that you no longer want In MariaDB database.
Q
What does autoremove command do in MariaDB?
Autoremove is used to remove the packages that were automatically installed to satisfy the dependencies for other packages In MariaDB
A
Autoremove is used to remove the packages that were automatically installed to satisfy the dependencies for other packages In MariaDB
Q
What does apt purge do in MariaDB?
A
Purge is identical to remove except that packages are removed and purged(configuration files are deleted too) in MariaDB
Q
Is it possible to regain deleted objects using purge in MariaDB?
A
Yes, it is not possible to regain deleted objects in MariaDB as it is gone forever.
Q
What does purge command do in MariaDB?
A
purge removes old and unneeded data in MariaDB.