apt mysql 5.1_Ubuntu 11.04 通过 apt 安装 MySQL 5.1 的全过程记录

7) Ubuntu下彻底卸载通过 apt 安装的 mysql

1) 停止 mysql 服务

$ sudo service mysql stop

2) 删除 mysql

按顺序执行如下命令:

$ sudo apt-get autoremove --purge mysql-server

$ sudo apt-get remove mysql-server

$ sudo apt-get autoremove mysql-server

$ sudo apt-get remove mysql-common -->非常重要,避免mysql的服务随机启动

上面的其实有一些是多余的,建议还是按照顺序执行一遍,命令行历史记录参考如下:dragon@usvm1104:~$ sudo apt-get autoremove --purge mysql-server

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages will be REMOVED:

libdbd-mysql-perl* libdbi-perl* libhtml-template-perl* libmysqlclient16*

libnet-daemon-perl* libplrpc-perl* mysql-client-5.1* mysql-client-core-5.1* mysql-common*

mysql-server* mysql-server-5.1* mysql-server-core-5.1*

0 upgraded, 0 newly installed, 12 to remove and 28 not upgraded.

After this operation, 61.1 MB disk space will be freed.

Do you want to continue [Y/n]? y

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = "en_US:en",

LC_ALL = (unset),

LANG = "en_US.UTF-8 UTF-8"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

(Reading database ... 50665 files and directories currently installed.)

Removing mysql-server ...

Removing mysql-server-5.1 ...

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Purging configuration files for mysql-server-5.1 ...

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Removing mysql-client-5.1 ...

Removing libdbd-mysql-perl ...

Removing libdbi-perl ...

Removing libhtml-template-perl ...

Removing mysql-server-core-5.1 ...

Removing mysql-client-core-5.1 ...

Removing libmysqlclient16 ...

Purging configuration files for libmysqlclient16 ...

Removing libplrpc-perl ...

Removing libnet-daemon-perl ...

Removing mysql-common ...

Purging configuration files for mysql-common ...

dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed.

Processing triggers for man-db ...

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Processing triggers for ureadahead ...

ureadahead will be reprofiled on next reboot

Processing triggers for libc-bin ...

ldconfig deferred processing now taking place

dragon@usvm1104:~$ sudo apt-get remove mysql-server

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package mysql-server is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

dragon@usvm1104:~$ sudo apt-get autoremove mysql-server

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package mysql-server is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

dragon@usvm1104:~$ sudo apt-get remove mysql-common

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package mysql-common is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

dragon@usvm1104:~$

3) 清理残留数据

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值