卸载重装ngin的问题解决方案

1,卸载nginx不保留配置文件

$ sudo apt-get --purge remove nginx

2,卸载自动安装且不再需要的依赖包

$ sudo apt-get autoremove

3,卸载nginx-common不保留配置文件

$ sudo apt-get --purge remove nginx-common

4,重新安装nginx

$ sudo apt-get install nginx

原文地址:https://www.cnblogs.com/500m/p/11798509.html