I have installed MariaDB from source and now I need to uninstall it. I used these commands to install it:

wget http://mirrors.hustunique.com/mariadb/mariadb-10.0.14/source/mariadb-10.0.14.tar.gz
tar -zxvf mariadb-10.0.14.tar.gz
cd mariadb-10.0.14/
apt-get install cmake
apt-get install g++ openssl libssl-dev libncurses5-dev libboost-dev bison
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
make && make install

How do I uninstall it?


3 Answers 3


There are a few other options which might be of use:

sudo apt-get remove mariadb-server

This will remove just the mariadb-server package itself.

sudo apt-get remove --auto-remove mariadb-server

This will remove the mariadb-server package and any other dependant packages which are no longer needed.

If you also want to delete your local/config files for mariadb-server then this will work.

sudo apt-get purge --auto-remove mariadb-server

but be careful with that last one. See the disclaimer at the installion site

  • 2
    this does not answer the question. There is explicitly mentioned that MariaDB was installed from source, so the apt-get won't help you.
    – Jakuje
    Commented Jan 15, 2016 at 18:21

first stop mariadb service

sudo service mysql stop


sudo apt-get --purge remove "mysql*" # this will delete all database , make backup of your db's

source :: how to remove mariadb fully

  • 1
    -1 because package manager doesn't handle packages that were installed from the source (as question had specified and similar to other downvoted answers).
    – user37165
    Commented Mar 20, 2016 at 10:17
  • @clearimura i removed mariadb like that 10 times ! try it before down voting .. it done it on my vps 10 times ... i installed multiple times mariadb from source
    – user889030
    Commented Mar 20, 2016 at 13:23

The easy way for this is installing the synaptic package manager by typing the following command in the terminal:

sudo apt-get install synaptic

And then open synaptic by:

sudo synaptic

Then search for the package you have installed, mariadb, and mark it for complete removal and press apply.

  • I'm search package mariadb in synaptic but any related package seen? Commented Apr 27, 2015 at 17:15
  • 4
    -1 Package managers like Synaptic can do nothing about software installed with make install. Commented Nov 14, 2015 at 21:33

Not the answer you're looking for? Browse other questions tagged .