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.