[Pkg-postgresql-public] Bug#911940: "apt-purge postgresql-10" on debian-testing appears to delete the postgresql data directory

Geoffrey Ferrari geoffrey.ferrari at oriel.oxon.org
Sun Nov 4 09:46:43 GMT 2018

To add further weight to my previous attempt to persuade whoever is in
charge of this that this behaviour is currently incorrect, I quote from the
man pages for apt-get purge (same as for apt purge):

Removing a package removes all packaged data, but leaves usually small
(modified) user configuration files behind, in case the remove was an
accident. Just issuing an installation request for the accidentally removed
package will restore its function as before in that case. On the other hand
you can get rid of these leftovers by calling purge even on already removed
packages. Note that this does not affect any data or configuration stored
in your home directory.

I accept that this is not 100% clear in the case of postgres where user
created data is stored in /var/lib. On the other hand, the behaviour
whereby purge deletes every database the user has created certainly does
not amount to removing "usually small configuration files".

What is supposed to be the good reason for ensuring that purge does remove
the user's databases?

On Mon, 29 Oct 2018 at 14:01, Geoffrey Ferrari <
geoffrey.ferrari at oriel.oxon.org> wrote:

> Hi Christoph,
> Thanks for replying.
> I think this is deeply mistaken, as well as dangerous and irresponsible.
> Yes, I expect apt-purge to remove all system-level traces of a package -
> but never user-level data.
> If I apt-purge libreoffice, should I expect it to delete all my office
> files? If I apt-purge emacs, should I expect it to delete every file I've
> ever edited?
> Who do we need to speak to in order to persuade them to change this
> behaviour?
> (FWIW, I haven't lost any important data - thank goodness. But I think
> this is such a bad decision that it's worth making a fuss over it before
> someone does lose something important.)
> Kind regards,
> Geoffrey
> On Mon, 29 Oct 2018 at 12:40, Christoph Berg <myon at debian.org> wrote:
>> Re: Geoffrey Ferrari 2018-10-26 <CAAoeO9j+UkJ1eu-O=DU_W=p92sSxnVuyf85e=
>> AHbmPKTAxaK3g at mail.gmail.com>
>> > Yesterday I ran: sudo apt-purge postgresql-10*
>> >
>> > This appears to have deleted my postgresql-10 data directory in
>> > /var/lib/postgresql/10...
>> >
>> > Is this expected behaviour? It seems highly undesirable.
>> Hi Geoffrey,
>> the difference between "apt remove" and "apt purge" is that the latter
>> is supposed to remove all traces of the package on the system, so it
>> works as intended.
>> As this question keeps popping up from time to time, I'll see if we
>> can add a debconf question about removing the PGDATA directory on
>> purge. (Chances are it isn't possible, though.)
>> Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-postgresql-public/attachments/20181104/b3f22152/attachment.html>

More information about the pkg-postgresql-public mailing list