



90853 files and directories currently installed.) $ sudo dpkg -i mysql-apt-config_0.8.24-1_all.deb Instead, we can set up MySQL by downloading the MySQL repo setup package for Debian distros: $ wget Yet, as our output shows, that command might not work on some Debian distros. This may mean that the package is missing, has been obsoleted, orĮ: Package 'mysql-server' has no installation candidate Package mysql-server is not available, but is referred to by another package. To set up MySQL again, we could run: $ sudo apt install mysql mysql-server So, we’ll ignore them.Īfter confirming that we’ve successfully done a clean removal of MySQL, we can move to the next step – reinstallation.

In our case, it returns some MySQL files and directories, but they aren’t directly related to the MySQL package. This find command is a basic way to verify whether we still have MySQL files and directories. usr/share/bash-completion/completions/mysql usr/lib/python3/dist-packages/ansible_collections/community/mysql Because of this, we should only use this method when we have a backup of our databases or when we have no means of retrieving any corrupted data.Īfter running the command above, we’ll check for leftovers with find: $ sudo find / -name mysql Ĭritically, this command thoroughly cleans the MySQL installation. Purging configuration files for mysql-community-server (8.0.31-1debian11). Mysql-community-client-plugins* mysql-community-server* mysql-community-server-core* mysql-server*Ġ upgraded, 0 newly installed, 9 to remove and 48 not upgraded.Īfter this operation, 298 MB disk space will be freed. Mysql-apt-config* mysql-client* mysql-common* mysql-community-client* mysql-community-client-core* So, we can include the –purge switch in the regular apt remove command: $ sudo apt remove -purge mysql\* -y For example, a corrupted database could persist. But then, these might keep us from successfully setting up MySQL after removing it. However, the usual uninstall commands leave some files and metadata.
