ubuntu16.04彻底删除nginx
2017-04-18 10:30
507 查看
1.先执行一下命令:
1.1 删除nginx,–purge包括配置文件
sudo apt-get --purge remove nginx1
1
1.2 自动移除全部不使用的软件包
sudo apt-get autoremove1
2
1
2
1.3 罗列出与nginx相关的软件
dpkg --get-selections|grep nginx1
1
执行1.3的结果: stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep nginx nginx install nginx-common install nginx-core f838 install1
2
3
4
5
6
1
2
3
4
5
6
1.4 删除1.3查询出与nginx有关的软件
sudo apt-get --purge remove nginx sudo apt-get --purge remove nginx-common sudo apt-get --purge remove nginx-core1
2
3
1
2
3
这样就可以完全卸载掉nginx包括配置文件
2.查看nginx正在运行的进程,如果有就kill掉
ps -ef |grep nginx1
1
看下nginx还有没有启动,一般执行完1后,nginx还是启动着的,如下:
stephen@stephen-OptiPlex-390:~$ ps -ef |grep nginx root 7875 2317 0 15:02 ? 00:00:00 nginx: master process /usr/sbin/nginx www-data 7876 7875 0 15:02 ? 00:00:00 nginx: worker process www-data 7877 7875 0 15:02 ? 00:00:00 nginx: worker process www-data 7878 7875 0 15:02 ? 00:00:00 nginx: worker process www-data 7879 7875 0 15:02 ? 00:00:00 nginx: worker process stephen 8321 3510 0 15:20 pts/0 00:00:00 grep --color=auto nginx1
2
3
4
5
6
7
1
2
3
4
5
6
7
3.kill nginx进程
sudo kill -9 7875 7876 7877 78791
1
4.全局查找与nginx相关的文件
sudo find / -name nginx*1
1
5.依依删除4列出的所有文件
sudo rm -rf file1
1
这样就彻底删除nginx了
相关文章推荐
- ubuntu14.04彻底删除nginx
- ubuntu16.04下安装和彻底删除mysql5.7
- ubuntu 16.04.1 nginx彻底删除
- ubuntu中彻底删除nginx
- Ubuntu彻底删除nginx和安装
- Ubuntu下彻底删除/重装 Nginx
- ubuntu14.04彻底删除nginx,并且重新安装
- ubuntu14.04彻底删除nginx
- ubuntu中彻底删除nginx
- Ubuntu下彻底删除/重装 Nginx
- ubuntu中彻底删除nginx
- ubuntu mysql 安装配置与彻底删除 (转)
- ubuntu彻底删除wine
- ubuntu 彻底删除wine 及 残留的快捷方式
- Ubuntu 彻底删除 MySQL
- UBUNTU 彻底删除 MYSQL 然后重装 MYSQL
- win7与ubuntu双系统如何彻底删除Ubuntu
- ubuntu下彻底删除mysql【装】
- ubuntu配置compiz乱套之后的恢复和彻底删除kubuntu-desktop
- ubuntu下彻底删除安装软件