--- Begin Message ---
package: apt
version: 1.8.2
Note: This was attempted on *fresh* Debian and Ubuntu installations.
$ apt install postgresql-11
$ apt purge postgresql-11
$ apt autoremove
leaves these packages behind:
postgresql-client-11
postgresql-client-common
postgresql-common
I checked the dependents using "apt rdepends $package"
postgresql-client-11: no dependents
postgresql-client-common: postgresql-client-11, postgresql-common
postgresql-common: logrotate
It makes no sense that "postgresql-client-11" was not removed. It's an automatic package with no dependents. (aptitude removes it automatically).
As for "postgresql-common" becoming a dependency for "logrotate", it doesn't make sense to me either, but I don't know if it's a bug or not.
I contacted a Postgres package maintainer and he believes APT is to blame here.
--- End Message ---
--- Begin Message ---
- To: "Mario E. Weisz" <MarioeWeisz@protonmail.com>, 948735-done@bugs.debian.org
- Subject: Re: Bug#948735: apt doesn't completely remove "postgresql-11" dependencies
- From: Julian Andres Klode <jak@debian.org>
- Date: Sun, 12 Jan 2020 22:02:51 +0100
- Message-id: <20200112220043.GA207194@debian.org>
- In-reply-to: <oAAmrbIdYf-WVBnFQqdGfqu0ThjzwVh709jefNGvTOxy0WwxN-fOnzQNSq8KGrFxP1xZsUpFDQ-grZb_sqpAySEajVwehasTmDVZ6Xa0YCs=@protonmail.com>
- References: <oAAmrbIdYf-WVBnFQqdGfqu0ThjzwVh709jefNGvTOxy0WwxN-fOnzQNSq8KGrFxP1xZsUpFDQ-grZb_sqpAySEajVwehasTmDVZ6Xa0YCs=@protonmail.com>
On Sun, Jan 12, 2020 at 05:40:17PM +0000, Mario E. Weisz wrote:
> package: apt
> version: 1.8.2
>
> Note: This was attempted on *fresh* Debian and Ubuntu installations.
>
> $ apt install postgresql-11
> $ apt purge postgresql-11
> $ apt autoremove
>
> leaves these packages behind:
> postgresql-client-11
> postgresql-client-common
> postgresql-common
It is not expected that install, followed by remove and autoremove produce
the original state. autoremoval also takes Depends, Recommends, and Suggests
(which are not automatically installed) from other installed packages into account,
as it must in order to produce safe-ish results, because removing a package that
is Suggested or more by another package would change that other packages behavior.
So this is not surprising or a bug.
>
> I checked the dependents using "apt rdepends $package"
> postgresql-client-11: no dependents
> postgresql-client-common: postgresql-client-11, postgresql-common
> postgresql-common: logrotate
>
> It makes no sense that "postgresql-client-11" was not removed. It's an automatic package with no dependents. (aptitude removes it automatically).
Probably something installed depends, recommends, or suggests
the postgresql-client that it provides.
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
--- End Message ---