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

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

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

Ruslan Mukhamedov



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




<a href="https://team.veeam.com/Pages/OrgChart.aspx?AccountName=AMUST\ruslan.mukhamedov" title="Prague Office ArtGen, Czech Republic">Ruslan Mukhamedov
Senior Developer (R&D) @ Veeam Software


R&D Backup, Data Protection


Prague Office ArtGen, Czech Republic


[hidden email]