i accidentally removed the /etc/init.d/nginx file and the /etc/nginx folder.

how can i fully reinstall nginx with reverting all confs to defaults?

link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

Assuming the package name for nginx is nginx

sudo apt-get purge nginx

Purge will remove conf files and such

sudo apt-get install nginx

to reinstall

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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