Stop interactive prompts from apt-get

9,365

You need to specify that you want to use the non-interactive frontend:

DEBIAN_FRONTEND=noninteractive apt-get -y install ...

With sudo:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ...
Share:
9,365

Related videos on Youtube

Cerin
Author by

Cerin

Updated on September 18, 2022

Comments

  • Cerin
    Cerin over 1 year

    How do you stop all interactive prompts from apt-get when installing or upgrading packages?

    I'm trying to write a non-interactive script to install packages on servers, whenever an upgrade requires installing a new kernel, apt-get always ignores the -y option and prompts me on what option to take to update grub.lst. I always want to install the package maintainer's version. How do I disable this prompt?