Hi,
I’m running uninstall of postgres-common from a script that runs in a non-interactive SSH session.
export DEBIAN_FRONTEND=noninteractive
apt-get -yq purge postgresql-common
The uninstall ignores -yq apt-get options and DEBIAN_FRONTEND variable and shows the following dialog:
Package configuration
┌──────────────────────────────────────────┤ Configuring postgresql-12 ├───────────────────────────────────────────┐
│ │
│ Removing the PostgreSQL server package will leave existing database clusters intact, i.e. their configuration, │
│ data, and log directories will not be removed. On purging the package, the directories can optionally be │
│ removed. │
│ │
│ Remove PostgreSQL directories when package is purged? │
│ │
│ <Yes> <No> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Please provide a way to suppress this dialog and pass a default selection via command line.
OS version: Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-1032-azure x86_64)
Postgres packages: postgresql-12_12.3-1.pgdg18.04+1_amd64.deb, postgresql-common_215.pgdg18.04+1_all.deb
Thanks.
Ruslan Mukhamedov
Senior Developer (R&D) @ Veeam Software