http://blog.csdn.net/u010571844/article/details/50819704
1 1 sudo apt-get --purge remove Nginx
1 2 1 2 sudo apt-get autoremove
1 dpkg --get-selections|grep Nginx
1 2 3 4 5 6 1 2 3 4 5 6 执行1.3的结果:stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep NginxNginx installNginx-common installNginx-core install
1 2 3 1 2 3 sudo apt---purge remove Nginxsudo apt---purge remove Nginx-commonsudo apt---purge remove Nginx-core
这样就可以完全卸载掉Nginx包括配置文件
1 ps -ef |grep Nginx
看下Nginx还有没有启动,一般执行完1后,Nginx还是启动着的,如下:
1 2 3 4 5 6 7 1 2 3 4 5 6 7 stephen@stephen-OptiPlex-390:~$ ps -ef |grep Nginxroot 7875 2317 0 15:02 ? 00:00 Nginx: master process /usr/sbin/Nginxwww-data 7876 7875 0 15:02 ? 00:00:00 Nginx: worker processwww-data 7877 7875 0 15:02 ? 00:00:00 Nginx: worker processwww-data 7878 7875 0 15:02 ? 00:00:00 Nginx: worker processwww-data 7879 7875 0 15:02 ? 00:00:00 Nginx: worker processstephen 8321 3510 20 pts/0 00 grep --color=auto Nginx
1 sudo kill -9 7875 7876 7877 7879
sudo find / -name Nginx*
sudo rm -rf file
这样就彻底删除Nginx了
sudo apt-get updatesudo apt-get install Nginx