【问题标题】:How to completely remove nginx from ubuntu 13.04? [closed]如何从 ubuntu 13.04 中完全删除 nginx? [关闭]
【发布时间】:2013-06-08 22:00:18
【问题描述】:

我知道之前也有人问过这个问题,我已经解决了这些问题,但它并没有解决我的问题。

为了从系统中删除 nginx,我执行了以下命令

sudo apt-get remove nginx

sudo apt-get purge nginx

实际上卸载了所有东西,但是当我这样做时 nginx -V 它仍然返回以下...

nginx版本:nginx/1.4.1 由 gcc 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) 构建 启用 TLS SNI 支持 配置参数:--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/ nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx。锁定 --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/ var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx -- group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module -- with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module

ps aux | grep nginx 也没有显示任何正在运行的 nginx 服务。

现在我不确定我是否完全删除了 nginx?如果没有,那怎么去掉呢?

dpkg -l | grep nginx 会返回以下...

ii nginx-common 1.2.6-1ubuntu3 所有小型、强大、可扩展的 Web/代理服务器 - 通用文件
ii nginx-full 1.2.6-1ubuntu3 i386 nginx web/proxy server(标准版)

编辑:我是从源代码安装的。

【问题讨论】:

  • 您需要删除/清除的软件包名称显然是nginx-fullnginx-common,而不仅仅是nginx...您可以使用dpkg -S $(which nginx) 进行验证。
  • @twalberg 好吧,你说得对。它对我有用。请将您的评论作为答案,我将其标记为关闭。谢谢。

标签: linux ubuntu nginx


【解决方案1】:

正如dpkg -l 的输出所示,所涉及的包名称实际上是nginx-fullnginx-common,而不仅仅是nginx。这些是需要删除的包。

要查找包含特定程序的包(例如nginx),您始终可以运行dpkg -S $(which nginx)

【讨论】:

  • 作为dpkg -S $(which nginx)的替代品,可以做dpkg -l | grep nginx
  • @ironicaldiction 是的,你可以,但这可能会列出几个包,其中dpkg -S $(which nginx) 将列出包含nginx 程序的单个包...
  • 好收获。只是想是否要从系统中清除所有相关文件。 @twalberg
猜你喜欢
  • 2019-10-19
  • 2020-10-18
  • 2017-11-29
  • 2018-10-22
  • 2017-03-14
  • 2017-10-31
  • 2016-12-01
  • 2017-04-13
  • 2019-09-12
相关资源
最近更新 更多