![apt autopurge apt autopurge](https://lh3.ggpht.com/-lfOh0JUd07c/Ut7OeW-vuWI/AAAAAAAAU5M/PFgydyOSL-0/qmidiarp_doc_en_html_thumb%25255B2%25255D.png)
If you have enabled logging for MySQL, make sure you delete the log files as well. Thus, these MySQL configuration files and database files need to be deleted manually. The configuration files are present in /etc/mysql and the security keys and other related files are stored in /var/lib/mysql. The command ‘ apt purge‘ does remove the binaries and the configuration files, however, there are some more MySQL configuration files and the database files which are not touched by any package manager. The reason we use ‘ purge‘ instead of ‘ remove‘ is that the former removes the configuration files for the program as well, whereas the latter only removes the program binaries. $ sudo apt purge mysql-server*Īs you can see, it has removed 3 packages that contain files for the server. The Ubuntu packages for MySQL Server start with ‘ mysql-server’ and you can use ‘ apt purge‘ to remove all these packages.
Apt autopurge how to#
Learn how to backup databases in MySQL here – How to Backup All MySQL Databases from Command-Line. If you have, before you remove MySQL Server from the system, make sure you take a backup of all your databases, so that when you reinstall it on another system or want to use the database on an existing server, you can simply restore them. If you do not have any database created in MySQL, you can skip this step.
![apt autopurge apt autopurge](https://derechoaleer.org/media/img/2014/firefox/mozilla-drm-out.png)
They are as follows: Backup All MySQL Databases There are few small steps you can follow to completely uninstall MySQL Server from your Ubuntu machines. Uninstalling MySQL Server does not simply amount to running ‘ apt purge‘ as is done usually. One such complex software is MySQL Server. While package management in Ubuntu, as in most Linux operating systems nowadays, makes it extremely easy to install, upgrade and delete a piece of software, some software is a bit more complex in nature and contains multiple configuration folders, etc.