[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Getting apt-get to accept defaults automatically

Generally speaking, if I do an apt-get upgrade, I want apt-get to just
accept the defaults for any prompts (the equivalent of just pressing
<enter>). I have mostly just hit <enter> myselfmanually, but it seems
there must be a way to tell apt-get not to bother prompting me (because I
wouldn't know what to choose in most cases anyway), and just choose the

I had a look at the man page, and it seems this is invoked using the -q=x
switch, described as follows:

"-q, --quietQuiet; produces output suitable for logging, omitting progress
indicators. More q's will produce more quiet up to a maximum of 2. You can
also use -q=# to set the quiet level, overriding the configuration file.
Note that quiet level 2 implies -y, you should never use -qq without a
no-action modifier such as -d, --print-uris or -s as APT may decided to do
something you did not expect. Configuration Item: quiet."

So, -q=2 will answer "y" to all questions, which is often not the
"default" answer when prompted (the default for the vast majority of
questions I am asked during an apt-get upgrade is, in fact, "N", i.e.,
when asked whether I want to replace the existing configuration file with
the package maintainers version, the default is "No".).

The man page doesn't say what happens if I use "-q=0" or "-q=1". The HOWTO
doesn't address the question at all.

Will either of these just accept the default response? Which? Is this in
the documentation somewhere and I just missed it? Or is this something
that can be set in a configuration file somewhere? If so, which?

Thanks, B

Reply to: