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

相关文章: