apt-get -yq purge postgresql-common shows interactive dialog

From: Ruslan Mukhamedov <Ruslan(dot)Mukhamedov(at)veeam(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Cc: Martin Ovesny <Martin(dot)Ovesny(at)veeam(dot)com>
Subject: apt-get -yq purge postgresql-common shows interactive dialog
Date: 2020-07-20 11:13:14
Message-ID: BYAPR14MB277429F20080F80190937E80F97B0@BYAPR14MB2774.namprd14.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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<https://team.veeam.com/Pages/OrgChart.aspx?AccountName=AMUST\ruslan.mukhamedov>
Senior Developer (R&D) @ Veeam Software
Department
R&D Backup, Data Protection
Office
Prague Office ArtGen, Czech Republic
Email
Ruslan(dot)Mukhamedov(at)veeam(dot)com<mailto:Ruslan(dot)Mukhamedov(at)veeam(dot)com>

Browse pgsql-bugs by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2020-07-20 12:09:24 Re: Buffers from parallel workers not accumulated to upper nodes with gather merge
Previous Message Francisco Olarte 2020-07-20 10:56:37 Re: Improvement for query planner? (no, not about count(*) again ;-))