Force non-interactive “dpkg --configure” when using apt-get install

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












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 ?







share|improve this question


























    up vote
    1
    down vote

    favorite












    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 ?







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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 ?







      share|improve this question














      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 ?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 13 at 18:33









      Stephen Kitt

      142k22308371




      142k22308371










      asked Jan 13 at 13:37









      Martin Vegter

      97231109218




      97231109218




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          This is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though:




          Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their
          effects may break your whole system.




          To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf:



          DPkg::options "--force-confdef"; ;


          or, for a single invocation:



          apt-get -o DPkg::Options::=--force-confdef ...





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416815%2fforce-non-interactive-dpkg-configure-when-using-apt-get-install%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote



            accepted










            This is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though:




            Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their
            effects may break your whole system.




            To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf:



            DPkg::options "--force-confdef"; ;


            or, for a single invocation:



            apt-get -o DPkg::Options::=--force-confdef ...





            share|improve this answer


























              up vote
              4
              down vote



              accepted










              This is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though:




              Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their
              effects may break your whole system.




              To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf:



              DPkg::options "--force-confdef"; ;


              or, for a single invocation:



              apt-get -o DPkg::Options::=--force-confdef ...





              share|improve this answer
























                up vote
                4
                down vote



                accepted







                up vote
                4
                down vote



                accepted






                This is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though:




                Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their
                effects may break your whole system.




                To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf:



                DPkg::options "--force-confdef"; ;


                or, for a single invocation:



                apt-get -o DPkg::Options::=--force-confdef ...





                share|improve this answer














                This is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though:




                Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their
                effects may break your whole system.




                To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf:



                DPkg::options "--force-confdef"; ;


                or, for a single invocation:



                apt-get -o DPkg::Options::=--force-confdef ...






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 13 at 14:49

























                answered Jan 13 at 13:41









                Stephen Kitt

                142k22308371




                142k22308371






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416815%2fforce-non-interactive-dpkg-configure-when-using-apt-get-install%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?