I have a server build script which uses apt-get to install packages. It then puts pre-written configuration files directly in place, so the interactive post-install configuration dialog in packages such as postfix is not needed. How do I skip this stage of the installation? It creates a piece of manual intervention that I would rather avoid.
I am aware of the -qq
option, but the manpage warns against using it without specifying a no-action modifier. I do want to perform an action, I just want to suppress a specific part of it.
You can do a couple of things for avoiding this. Setting the
DEBIAN_FRONTEND
variable tononinteractive
and using-y
flag. For example:If you need to install it via sudo, use:
I've found that setting
-yqq
andDEBIAN_FRONTEND=noninteractive
don't work in some cases whereapt-get
stalls at the end withIt will not exit until after you press the
enter
key.My solution to this is to do everything everyone else suggested, but also with
yes
piped toapt-get
as follows