I need to install a package in a script. This process needs to write over some already existing configuration files. Right now even though run with DEBIAN_FRONTEND=noninteractive and --force-yes -y, apt still asks for user input:

Configuration file `/etc/init.d/nginx'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
     D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** nginx (Y/I/N/O/D/Z) [default=N] ? 

How to make this completely uninteractive?

1 Answer 1


You can try yes | program or dpkg-reconfigure debconf


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.