Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Possible Duplicate:
How can I replace missing configuration files after removing a package?

I have installed nginx with apt-get. Than I removed it. I also manually removed /etc/init.d/nginx. After I installed it again with apt-get, it didn't create /etc/init.d/nginx. So service nginx doesn't work anymore. Is is possible to force apt-get to create this file again?

share|improve this question

marked as duplicate by Lekensteyn, Jorge Castro, James Feb 15 '12 at 22:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 12 down vote accepted

Looks like somehow a record remains of that file, which counts as a configuration file (apparently), so a simple apt-get remove doesn't get rid of that record; thus, when reinstalling, apt-get tries to be nice and not overwrite a configuration file (which doesn't exist).

To recreate it, first uninstall using purge to remove even configuration files and records:

apt-get purge nginx nginx-common nginx-full

then reinstall:

apt-get install nginx
share|improve this answer

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