Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 55 down vote accepted

You can do a couple of things for avoiding this. Setting the DEBIAN_FRONTEND variable to noninteractive and using -y flag. For example:

export DEBIAN_FRONTEND=noninteractive
apt-get -y install [packagename]

If you need to install it via sudo, use:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install [packagename]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.