I am installing packages on remote server, using ssh:
ssh root@my-host "DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get --quiet --yes install w3m"
even though I have set DEBIAN_FRONTEND=noninteractive, the installation gets stuck on following question, and I have to press enter manually:
Configuration file '/etc/w3m/config'
 ==> 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.
*** config (Y/I/N/O/D/Z) [default=N] ? 
I suspect, the question is being asked by dpkg --configure -a and not by apt-get and therefore noninteractive is ignored.
How can I automate this and have default option selected automatically, without being asked ?