How to purge completly a broken MySQL

NoOp glgxg at sbcglobal.net
Sun Jan 11 03:46:59 UTC 2009


On 01/10/2009 06:22 PM, NoOp wrote:
> On 01/10/2009 06:13 PM, stan wrote:
>> On Sat, Jan 10, 2009 at 04:06:42PM -0800, NoOp wrote:
>>> On 01/10/2009 03:40 PM, stan wrote:
>>> > On Sat, Jan 10, 2009 at 04:07:25PM -0500, steve wrote:
>>> >> Hal Burgiss wrote:
>>> >> > On Sat, Jan 10, 2009 at 02:41:20PM -0500, stan wrote:
>>> >> >> How can I force a complete purge of this package?
>>> >> > 
>>> >> > apt-get purge ....
>>> >> > 
>>> >> > AFAIK, that will remove all remnants of the original installation.
>>> >> > 
>>> >> 
>>> >> sudo apt-get remove --purge packagename
>>> >> 
>>> > That results in:
>>> > 
>>> > Package mysql-server-5.0 is not installed, so not removed
>>> 
>>> Reinstall it and then purge it. Here is what it installs (note the '-s'
>>> which means that I've "simulated" the install" so nothing actually got
>>> installed on my system):
>>> 
>>> $ sudo apt-get install -s mysql-server-5.0
>>> Reading package lists... Done
>>> Building dependency tree
>>> Reading state information... Done
>>> The following extra packages will be installed:
>>>   libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
>>>   mysql-client-5.0
>>> Suggested packages:
>>>   dbishell mysql-doc-5.0 tinyca
>>> Recommended packages:
>>>   libterm-readkey-perl apparmor libhtml-template-perl
>>> The following NEW packages will be installed:
>>>   libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
>>>   mysql-client-5.0 mysql-server-5.0
>>> 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
>>> Inst libnet-daemon-perl (0.38-1.1 Ubuntu:8.04/hardy)
>>> Inst libplrpc-perl (0.2017-1.1 Ubuntu:8.04/hardy)
>>> Inst libdbi-perl (1.601-1 Ubuntu:8.04/hardy)
>>> Inst libdbd-mysql-perl (4.005-1 Ubuntu:8.04/hardy)
>>> Inst mysql-client-5.0 (5.0.51a-3ubuntu5.4 Ubuntu:8.04/hardy-updates)
>>> Inst mysql-server-5.0 (5.0.51a-3ubuntu5.4 Ubuntu:8.04/hardy-updates)
>>> Conf libnet-daemon-perl (0.38-1.1 Ubuntu:8.04/hardy)
>>> Conf libplrpc-perl (0.2017-1.1 Ubuntu:8.04/hardy)
>>> Conf libdbi-perl (1.601-1 Ubuntu:8.04/hardy)
>>> Conf libdbd-mysql-perl (4.005-1 Ubuntu:8.04/hardy)
>>> Conf mysql-client-5.0 (5.0.51a-3ubuntu5.4 Ubuntu:8.04/hardy-updates)
>>> Conf mysql-server-5.0 (5.0.51a-3ubuntu5.4 Ubuntu:8.04/hardy-updates)
>>> 
>>> So, reinstall:
>>> 
>>> sudo apt-get install --reinstall mysql-server-5.0
>>> 
>>> and then purge it:
>>> 
>>> sudo apt-get remove --purge mysql-server-5.0
>>> 
>>> and you should be ok.
>> 
>> Well, people can quit worrying about this. Running
>> 
>> apt-get remove --purge apt-get remove --purge mysql-server-5.0
>> mysql-common  mysql-client-5.0
>> 
>> Pretty much completly destoryed my system.
> 
> And you purged mysql-common because? Here is what happens when if I were
> to do that on my system:
> 
> ~$ sudo apt-get purge -s mysql-common
> [sudo] password for <>?:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages were automatically installed and are no longer
> required:
>   libogdi3.2 proj libgeos2c2a libgeos-c1 libhdf5-serial-1.6.5-0 libhdf4g
>   libpqxx-2.6.9ldbl
> Use 'apt-get autoremove' to remove them.
> The following packages will be REMOVED:
>   amarok* amarok-xine* gstreamer-dbus-media-service*
>   gstreamer0.10-plugins-bad* kexi* kspread* kword* libgdal1-1.4.0*
> libgmyth0*
>   libmysqlclient15off* libqgis-core1* libqgis-gui1* mysql-common* qgis*
>   totem-plugins-extra*
> 0 upgraded, 0 newly installed, 15 to remove and 0 not upgraded.
> Purg amarok [2:1.4.9.1-0ubuntu3.1+medibuntu1] [amarok-xine ]
> Purg amarok-xine [2:1.4.9.1-0ubuntu3.1+medibuntu1]
> Purg gstreamer-dbus-media-service [0.1.17-0ubuntu1]
> Purg gstreamer0.10-plugins-bad [0.10.6-5ubuntu0.1]
> Purg kword [1:1.6.3-4ubuntu7]
> Purg kspread [1:1.6.3-4ubuntu7]
> Purg kexi [1:1.6.3-4ubuntu7]
> Purg qgis [1.0.0~hardy1]
> Purg libqgis-gui1 [1.0.0~hardy1]
> Purg libqgis-core1 [1.0.0~hardy1]
> Purg libgdal1-1.4.0 [1.4.4-1ubuntu3]
> Purg totem-plugins-extra [2.22.1-0ubuntu2]
> Purg libgmyth0 [0.7.debian1-1~hardy1]
> Purg libmysqlclient15off [5.0.51a-3ubuntu5.4]
> Purg mysql-common [5.0.51a-3ubuntu5.4]
> 
> Note: the list will not be the same on your system unless you have kword
> etc installed.
> 
> The *only* commands suggested were:
> 
> sudo apt-get install --reinstall mysql-server-5.0
> 
> and
> 
> sudo apt-get remove --purge mysql-server-5.0
> 
> 
> 

OK, I think I've figured out your issue; after you 'sudo apt-get remove
--purge mysql-server-5.0' while the mysql daemon is still running you
will get erros. You need to reboot and then 'sudo apt-get remove --purge
mysql-server-5.0' again, then reboot & you'll find it gone.

You can do it without rebooting if you kill the mysql daemon:

sudo apt-get install --reinstall mysql-server-5.0

then kill the mysqld processes:

sudo killall mysqld
sudo killall mysqld_safe

and then

sudo apt-get remove --purge mysql-server-5.0

and you'll get no errors and will find mysql gone. I've just tested by
installing and purging on my hardy system.

Note: if you reply to this post *please* do not cc me on the post - I
read and respond on the list, so I don't need an extra copy of your
response.







More information about the ubuntu-users mailing list