No more dialog in `apt upgrade -y` events

Scott Moser smoser at
Mon Nov 26 15:37:28 UTC 2018

Just an FYI, you should not be using 'apt' from scripts or automation.
Per its own man page apt(8)

|  The apt(8) commandline is designed as an end-user tool and it may
|  change behavior between versions. While it tries not to break backward
|  compatibility this is not guaranteed either if a change seems
|  beneficial for interactive use.
|  All features of apt(8) are available in dedicated APT tools like
|  apt-get(8) and apt-cache(8) as well.  apt(8) just changes the default
|  value of some options (see apt.conf(5) and specifically the Binary
|  scope). So you should prefer using these commands (potentially with
|  some additional options enabled) in your scripts as they keep backward
|  compatibility as much as possible.

Your comments do also apply to 'apt-get' so they are still relevant.

On Sun, Nov 25, 2018 at 6:21 AM Robie Basak <robie.basak at> wrote:
> Hi,
> On Sun, Nov 25, 2018 at 02:40:30PM +0800, Jesse Steele wrote:
> > I'm a dev who relies on updates on many machines; I write scripts to handle
> > them. I don't have the resources to investigate every daily build to see if
> > GRUB or PHP is going to ask a question that, under most circumstances, needs
> > the obvious, default answer.
> In your case, using DEBIAN_FRONTEND=noninteractive, running apt-get with -o
> Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
> and redirecting stdin from /dev/null is probably appropriate.
> > This isn't just any Linux distro, this is the awesome Ubuntu, which we use
> > for its reliability. So, we don't need to have PHP and GRUB or any other
> > update nag us at the `apt upgrade -y` events. All `upgrade` packages should
> > come with a presumed response—GRUB's menu can be updated when IT wants to,
> > don't bother asking if I used `-y`; and no of course I don't want to
> > override all the php.ini settings I have for my production servers. If
> > upgrade packages need options, let the devs with more resources still have
> > the option, with information on how to automate those in the `upgrade` well
> > in advance, but not if using `upgrade -y`.
> Please note - by
> default you shouldn't get prompted, and if you do it's a bug (possibly
> this bug - please mark yourself as affected if you are).
> Normally though, when there isn't a bug, if you change your system the
> distribution doesn't want to step on your feet, so it has to prompt. It
> can't have the knowledge of the customisation you've performed (only you
> can know that), and doing the wrong thing may lead to a broken system.
> If you don't want the prompt in automation, you can use the appropriate
> options to turn it off. I don't think it makes sense to change the
> default for this case; the most appropriate default is for normal
> interactive use.
> Hope that helps,
> Robie
> --
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss at
> Modify settings or unsubscribe at:

More information about the Ubuntu-devel-discuss mailing list