ubuntu14.04彻底删除nginx
cookqq ›博客列表 ›nginx

ubuntu14.04彻底删除nginx

2017-07-17 14:13:11.0|分类: nginx|浏览量: 1864

摘要: sudo apt-get --purge remove nginx sudo apt-get autoremove

1.先执行一下命令:

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

sudo apt-get --purge remove nginx

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

sudo apt-get autoremove

1.3 罗列出与nginx相关的软件

dpkg --get-selections|grep nginx
执行1.3的结果:
stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep nginx
nginx                       install
nginx-common                    install
nginx-core                  install

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

sudo apt-get --purge remove nginxsudo apt-get --purge remove nginx-commonsudo apt-get --purge remove nginx-core

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

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

ps -ef |grep nginx

看下nginx还有没有启动,一般执行完1后,nginx还是启动着的,如下:

stephen@stephen-OptiPlex-390:~$ ps -ef |grep nginxroot      7875  2317  0 15:02 ?        00: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  0 15:20 pts/0    00:00:00 grep --color=auto nginx

3.kill nginx进程

sudo kill  -9  7875 7876 7877 7879

4.全局查找与nginx相关的文件

sudo  find  /  -name  nginx*

5.依依删除4列出的所有文件

sudo rm -rf file

这样就彻底删除nginx了

6. 再次重装

sudo apt-get updatesudo apt-get install nginx


转载文章:http://blog.csdn.net/u010571844/article/details/50819704

一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.