Bug#948735: apt doesn't completely remove "postgresql-11" dependencies
(too old to reply)
Mario E. Weisz
2020-01-12 17:50:02 UTC
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:

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.
Mario E. Weisz
2020-01-12 22:10:02 UTC
Thank you for your response.
Probably something installed depends, recommends, or suggests the postgresql-client that it provides.
$ apt rdepends postgresql-client-11 --installed

returns nothing (empty result).

The install/remove/autoremove sequence was executed right after a fresh installation.
Mario E. Weisz
2020-01-14 10:40:02 UTC
Julian? Anyone?
Mario E. Weisz
2020-01-15 15:10:02 UTC
if you can't explain this behavior or don't have time to look into it then at least don't keep this bug report marked as resolved.