[debian-mysql] About removing /var/lib/mysql on purge

Clint Byrum spamaps at debian.org
Wed Nov 26 21:17:57 UTC 2014


Excerpts from Stewart Smith's message of 2014-11-25 01:58:09 -0800:
> Otto Kekäläinen <otto at seravo.fi> writes:
> > Here is a bug about /var/lib/mysql and /etc/mysql/debian.cnf being
> > left behing on purging which based on piuparts logs seem to apply on
> > both mysql and mariadb packages.
> >
> > I added the result of my investigation as comments in the bug three
> > weeks ago, but since then I haven't had any new ideas about it.
> >
> > Would somebody else maybe want to take a try to come up with a solution?
> 
> Hrm... what does PostgreSQL do? Does removing apache remove /var/www ?
> 
> I can imagine if --purge removed /var/lib/mysql we'd get bug reports
> about all of their data being gone....
> 

https://alioth.debian.org/scm/loggerhead/pkg-postgresql/postgresql-9.4/trunk/view/head:/debian/postgresql-9.4.postrm#L47

PostgreSQL removes everything, because thats what purge is supposed to
do. I do think that apt-get's purge documentation could be a little more
clear:

       purge
           purge is identical to remove except that packages are removed and
           purged (any configuration files are deleted too).

aptitude is a little more clear:

           <package>_
               Purge <package>: remove it and all its associated configuration
               and data files.

Dpkg is no good too:

       purge  The package is selected to be purged (i.e. we want to remove every‐
              thing from system directories, even configuration files).

But, policy manual allows us to do like pgsql, and I am o-k with doing
that. I just think that the commands that accept 'purge' as an instruction
should be more clear _DATA WILL BE REMOVED_.



More information about the pkg-mysql-maint mailing list