Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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, jrg 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.

add comment

1 Answer 1

up vote 9 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
add comment

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