Removing Mysql completely!

It’s not as straightforward as you might think to completely remove MySQL from your linux box.

Here are the details:

Use apt to uninstall and remove all MySQL packages:

sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
sudo apt-get autoremove -y 
sudo apt-get autoclean

Remove the MySQL folder:

sudo rm -rf /etc/mysql

List all MySQL files on your server:

sudo find / -iname 'mysql*'

Depending on what you found, cherry pick the ones you want to delete or go wild by:

sudo find / -iname 'mysql*' -exec rm -rf {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.