如何确保 mysql 和 mariadb 重新安装干净

如何确保 mysql 和 mariadb 重新安装干净

我安装了 mysql 和 mariadb,但由于无法 root 登录,我决定卸载它并重新安装。

我遵循以下步骤

sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean

这是否足以完全删除 mysql 和 mariadb,以便不会发生包损坏问题?

$ locate mysql

/etc/apparmor.d/abstractions/mysql
/etc/apparmor.d/cache/usr.sbin.mysqld
/usr/include/qt4/Qt/qsql_mysql.h
/usr/include/qt4/QtSql/qsql_mysql.h
/usr/lib/libreoffice/share/config/soffice.cfg/dbaccess/ui/dbwizmysqlintropage.ui
/usr/lib/libreoffice/share/config/soffice.cfg/dbaccess/ui/dbwizmysqlnativepage.ui
/usr/lib/libreoffice/share/config/soffice.cfg/dbaccess/ui/mysqlnativepage.ui
/usr/lib/libreoffice/share/config/soffice.cfg/dbaccess/ui/mysqlnativesettings.ui
/usr/share/app-install/desktop/gmysqlcc:gmysqlcc.desktop
/usr/share/app-install/desktop/mysql-client.desktop
/usr/share/app-install/desktop/mysql-server.desktop
/usr/share/app-install/desktop/mysql-workbench:mysql-workbench.desktop
/usr/share/app-install/icons/gmysqlcc-32.png
/usr/share/app-install/icons/mysql-workbench.png
/usr/share/bash-completion/completions/mysql
/usr/share/bash-completion/completions/mysqladmin
/var/cache/apt/archives/libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb
/var/crash/mysql-community-server.0.crash
/var/lib/app-info/icons/ubuntu-xenial-universe/64x64/gmysqlcc_gmysqlcc-32.png
/var/lib/app-info/icons/ubuntu-xenial-universe/64x64/mysql-workbench_mysql-workbench.png
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_InRelease
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-5.7_binary-amd64_Packages
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-5.7_binary-i386_Packages
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-5.7_source_Sources
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-apt-config_binary-amd64_Packages
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-apt-config_binary-i386_Packages
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-tools_binary-amd64_Packages
/var/lib/apt/lists/repo.mysql.com_apt_ubuntu_dists_xenial_mysql-tools_binary-i386_Packages

我应该从上面的列表中删除一些文件吗?

答案1

您运行的命令已经足够了。在这种情况下,我也不会依赖它,locate因为该命令每天只构建一次文件数据库,并且可能只是列出已被您运行的命令删除的文件。

相关内容