Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted


export DEBIAN_FRONTEND=noninteractive
apt-get -y install package1 package2
share|improve this answer
Just tested it, works like a charme. – arney Jun 14 '13 at 17:33

while coming to your first one,

acroread wants to know, whether acrobat should be standard PDF reader

here its asking you to set acroread as default PDF reader that you have to set manually and It wont set automatically unless you have no other PDF readers pre-installed in your Ubuntu system. But with the Ubuntu install by default you will get a PDF reader.

Bottom-Line : you have to set it manually due to multiple applications for the single operation.

second issue ,

libpam-ldap: What's your LDAP-Servers URI, version, password, ...

what ever you are doing here , you simply giving the permission just to perform the single operation and not to any of setting URL, passwords and etc..,

Bottom -Line : Ubuntu will do what you were asked to do.

Hope that help you my friend.

share|improve this answer
There's no PDF viewer on Ubuntu Server and still apt-get --no-install-recommends --force-yes install acroread will ask! And in the second part I just don't get what you want to tell me... – arney Jun 14 '13 at 17:25

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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