Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When installing some packages (like RabbitMQ) on Debian/Ubuntu machines, the post-install step defaults to starting the service.

While this is great in most cases, in some cases (when you already have a service running on the needed port for example) this fails which makes apt-get fail completely.

Is there a way to tell apt-get to skip all those post-install steps so it can still install properly?

share|improve this question
up vote 9 down vote accepted

How do I ask apt-get to skip any interactive post-install configuration steps?

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

Edit: yes, that was for skipping (well, automating) post-install questions, true - sorry.

There is no way to skip post-install scripts. The official Debian policy is to edit the script to return a non-terminal error, or fix the script. See

It sounds like you're automating this for many servers, in which case, you'll probably want to make your own version of the package and deploy that. Another option is to email the package maintainer and discuss whether a failure-to-start should be a terminal error for post-install (I don't believe it is for other packages like apache or lighttpd, for example, but I could be wrong.)

share|improve this answer
That's just to skip interactive steps. Those are not the problem here, these are the non-interactive post-install steps that fail if something like service rabbitmq-server start fails. – Wolph Jan 9 '12 at 4:57
Updated. Does that help? – Brett Dikeman Jan 9 '12 at 5:39
it does, better to know that it's not possible than wondering if it is :) Thanks for the help. – Wolph Jan 9 '12 at 7:07
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:09

What you may want to do is something with the policy-rc.d. See the man page for invoke-rc.d. You can set a policy so services will not be automatically started.

share|improve this answer
That's a way to work around it, but that would be a temporary measure I assume? Atleast... I think that way you would globally disable all service starts. – Wolph Jan 9 '12 at 18:19

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.