My goal is to uninstall PostgreSql (installed on a Linux host- Ubuntu 18.04 LTS) using a bash script file.
I use the following command:
apt remove --purge -y postgresql-12 && apt autoremove -y
The problem is that, launching it from the terminal, at a certain point it opens a confirmation window (you have to press enter to go on).
So when I put this command in the bash script file, it gets stuck (as I assume it is waiting for confirmation).
I tried also with 'apt-get' instead of 'apt', but nothing changed.
I tried also adding option '-qq' or --assume-yes, but nothing changed.
How can I solve the problem?