<div dir="ltr"><div dir="ltr">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):<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div dir="ltr"><div><div>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.</div></div></div></blockquote><div dir="ltr"><div><br></div><div>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".</div><div><br></div><div>What is supposed to be the good reason for ensuring that purge does remove the user's databases?</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 29 Oct 2018 at 14:01, Geoffrey Ferrari <<a href="mailto:geoffrey.ferrari@oriel.oxon.org">geoffrey.ferrari@oriel.oxon.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Christoph,<div><br></div><div>Thanks for replying.</div><div><br></div><div>I think this is deeply mistaken, as well as dangerous and irresponsible.</div><div><br></div><div>Yes, I expect apt-purge to remove all system-level traces of a package - but never user-level data.</div><div><br></div><div>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?</div><div><br></div><div>Who do we need to speak to in order to persuade them to change this behaviour?</div><div><br></div><div>(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.)</div><div><br></div><div>Kind regards,</div><div><br></div><div>Geoffrey</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 29 Oct 2018 at 12:40, Christoph Berg <<a href="mailto:myon@debian.org" target="_blank">myon@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Re: Geoffrey Ferrari 2018-10-26 <CAAoeO9j+UkJ1eu-O=DU_W=p92sSxnVuyf85e=<a href="mailto:AHbmPKTAxaK3g@mail.gmail.com" target="_blank">AHbmPKTAxaK3g@mail.gmail.com</a>><br>
> Yesterday I ran: sudo apt-purge postgresql-10*<br>
> <br>
> This appears to have deleted my postgresql-10 data directory in<br>
> /var/lib/postgresql/10...<br>
> <br>
> Is this expected behaviour? It seems highly undesirable.<br>
<br>
Hi Geoffrey,<br>
<br>
the difference between "apt remove" and "apt purge" is that the latter<br>
is supposed to remove all traces of the package on the system, so it<br>
works as intended.<br>
<br>
As this question keeps popping up from time to time, I'll see if we<br>
can add a debconf question about removing the PGDATA directory on<br>
purge. (Chances are it isn't possible, though.)<br>
<br>
Christoph<br>
</blockquote></div>
</blockquote></div>