Take the acroread or libpam-ldap packages as examples.

Even when installed with apt-get --force-yes they still ask questions:

  • acroread wants to know whether acrobat should be the standard PDF reader (how to assume yes?)
  • libpam-ldap What's your LDAP-Servers URI, version, password, ...? (how to just assume anything, the ldap.conf will be overwritten by puppet anyway)

Is there a "for god's sake assume anything and stop nagging"-switch for apt-get?



export DEBIAN_FRONTEND=noninteractive
apt-get -y install package1 package2
  • Is export DEBIAN_FRONTEND=noninteractive needed or the y option in apt-get is sufficient? Oct 30 '21 at 3:21

Another solution: use yes command to blindly answer yes to all questions.

Apt is smart enough that this solution isn't recommended unless:

  1. you know what you're doing, and

  2. the -y and --force-yes options don't do what you want

In my case, I want to downgrade Nginx, and I don't care about the dependencies. For some reason force-yes didn't work, nor did the DEBIAN_FRONTEND=noninteractive environment variable.

Here's how to downgrade a package noninteractively:

yes | apt install nginx-common=1.4.6-1ubuntu3.3 nginx-full=1.4.6-1ubuntu3.3

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.