Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
add comment

1 Answer

up vote 25 down vote accepted

You can do a couple of things for avoiding this

First set the variable export DEBIAN_FRONTEND=noninteractive then you can run apt-get -y install [packagename], this should do exactly what you want.

share|improve this answer
    
I agree with the lynxman's method. –  Jonathan Rioux Jan 26 '11 at 16:50
    
This works perfectly, thanks. –  jl6 Jan 26 '11 at 17:05
8  
If you're using sudo the export of the environment variable won't work, but you can do it this way: sudo DEBIAN_FRONTEND=noninteractive apt-get -y [packagename] –  aculich Oct 31 '12 at 21:10
    
Thanks. I needed to do this to do an unattended install of strongswan (strongswan-starter) on Ubuntu. –  gdw2 May 6 '13 at 20:10
1  
Pretty close, but you're all missing the 'action' to apt-get (i.e. "install"): apt-get -y install [packagename] (the same goes for the comment regarding sudo) –  Cristi Diaconescu May 11 '13 at 15:03
show 1 more comment

Your Answer

 
discard

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.