Reputation: 882
How can I totally disable the prompts that appear while installing a Debian package? I've used all the options that I've found but there are some packages that are still prompting.
I'm using this command:
apt-get -y --allow-unauthenticated --force-yes -o DPkg::Options::="--force-overwrite" -o DPkg::Options::="--force-confdef" install x11-common
Why is the x11-common
package still prompting? How can I get rid of these prompts?
Upvotes: 2
Views: 5133
Reputation: 189938
The proper solution to avoid prompts without necessarily accepting defaults is to use preseeding. This means you populate the Debconf database with answers to the questions the package installation is going to ask, and then it won't ask because it gets the answers from the database.
You might still want to use an option to disable interactive prompting, just to be on the safe side.
(A lot of the preseeding documentation you find on the Internet is specifically about unattended system installation, but you can use preseeding for any individual package at any point before installing it.)
In very brief, install x11-common
and dependent packages manually on a system, then use debconf-get-selections
to extract the configuration settings to a text file. (This tool is included in the debconf-utils
package.) Include that text file in your target installation package (or perhaps publish it on a web server), and run debconf-set-selections
with information from this file on the target system before running dpkg
(or apt
etc).
Upvotes: 1
Reputation: 6336
You don't provide any details about what prompt this is, but I am guessing it is debconf
prompting for configuration questions.
If so, you can set debconf
to noninteractive mode. For example, by doing dpkg-reconfigure debconf
and then it will use the defaults for everything.
Upvotes: 2
Reputation: 356
You need to tell debconf
to use the noninteractive
frontend, like this:
DEBIAN_FRONTEND="noninteractive" apt-get -y --allow-unauthenticated --force-yes -o DPkg::Options::="--force-overwrite" -o DPkg::Options::="--force-confdef" install x11-common
Upvotes: 6