nginx怎么卸载

nginx怎么卸载,第1张

nginx怎么卸载 本文主要介绍如何卸载编译安装在Linuxs上的nginx

删除nginx,–purge包括配置文件

sudo apt-get --purge remove nginx

自动移除全部不使用的软件包

sudo apt-get autoremove

罗列出与nginx相关的软件

dpkg --get-selections|grep nginx

执行结果:

stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep nginx
nginx                       install
nginx-common                install
nginx-core                  install

删除查询出与nginx有关的软件

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

这样就可以完全卸载掉nginx包括配置文件

查看nginx正在运行的进程,如果有就kill掉

 ps -ef |grep nginx

看下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 nginx

kill nginx进程

sudo kill  -9  7875 7876 7877 7879

全局查找与nginx相关的文件

sudo  find  /  -name  nginx*

依次删除列出的所有文件

sudo rm -rf file

这样就彻底删除nginx了

更多Nginx相关技术文章,请访问Nginx使用教程栏目进行学习!

以上就是nginx怎么卸载的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/708244.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存