I am Kinyungu, an IT support specialist and loves to help people to have ease time understanding and using applications.Recently growing a career as a data engineer.
In this article, we look on how to uninstall MySQL server in Ubuntu 22.04. What may cause one to uninstall MySQL server? In case you face unexpected issues while using it or the MySQL server updates or even you willingly decide to uninstall it from your computer.
So follow along and see how we uninstall our MySQL server. Let us do it!!!
First step, we open our Ubuntu terminal, use the shortcut:
CTRL
+ ALT
+ T
Good now we are at our terminal, we will write the command to remove MySQL server:
sudo apt-get remove --purge mysql*
Lets explain this command:
sudo
enables you to run with root privileges.
apt-get remove
this command only uninstalls a package from your machine but the package configuration file remains in your computer.
--purge mysql*
It is passed as parameter to the apt-get remove
command.
Next let's us remove the purge:
sudo apt-get purge mysql*
Lets understand this command, we know what sudo
does.
apt-get purge mysql*
, this command will delete all files and directories associated with MySQL.
At this point we have successfully uninstalled MySQL server from our Ubuntu 22.04.
However its advisable to run the following commands so that our MySQL server is uninstalled completely without leaving residue files.
sudo apt-get autoremove
sudo apt-get autoclean
Running the above commands leaves your system clean and you can continue to use your Ubuntu 22.04 well.
This should be considered optional and I would advise one to do this. After uninstalling applications or packages its good to update the system to be up to-date.
We will run this command:
sudo apt-get dist-upgrade
This command will update the repositories packages of applications in the system and also updates the kernel to a new version. It has an intelligent manner to handle dependencies of packages. This will involve to handle conflicts that arise due changes in dependencies or removing dependency packages no longer required. If required it installs new packages that will be required by the new kernel version in our system.
**Yeah!! **Indeed we did uninstall MySQL server.
I hope this article will help anyone uninstalling MySQL server from Ubuntu 22.04 and any other reader looking to learn.
Top comments (7)
Thank you
Welcome Martin
Thanks this was useful.
Do you have the steps on how to install MySQL successfully on Ubuntu 22.04?
Sure, I will write on this Dennis
And a year after the last comment, Thank You. Now if I could only install it and get past the default pw problem
Thank you
Thank you!!