Linux 如何从 ubuntu 13.04 中完全删除 nginx?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17071453/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:12:13  来源:igfitidea点击:

How to completely remove nginx from ubuntu 13.04?

linuxubuntunginx

提问by ???? ???p

I know this question has been asked earlier as well and I have gone through them but it does not solve my problem.

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

To remove nginx from system I executed following commands

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

sudo apt-get remove nginx

sudo apt-get purge nginx

Which actually uninstalled everything but when I do nginx -Vit still returns following ...

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

nginx version: nginx/1.4.1 built by gcc 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) TLS SNI support enabled configure arguments: --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.lock --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

nginx 版本:由 gcc 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) 构建的 nginx/1.4.1 启用 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 log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.loglock --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--with-file-aio --with-ipv6 --with-http_spdy_module--with-file-aio --with-ipv6 --with-http_spdy_module

Also ps aux | grep nginxis not showing any nginx service running.

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

Now I am not sure that if I have completely removed nginx or not? If not then how to remove it?

现在我不确定我是否已经完全删除了 nginx?如果不是那么如何删除它?

And dpkg -l | grep nginxreturns following ...

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

ii nginx-common 1.2.6-1ubuntu3 all small, powerful, scalable web/proxy server - common files
ii nginx-full 1.2.6-1ubuntu3 i386 nginx web/proxy server (standard version)

ii nginx-common 1.2.6-1ubuntu3 所有小型、强大、可扩展的网络/代理服务器 - 公共文件
ii nginx-full 1.2.6-1ubuntu3 i386 nginx 网络/代理服务器(标准版)

EDIT: I installed it from the source.

编辑:我从源代码安装它。

采纳答案by twalberg

As your output from dpkg -lshows, the package names involved are actually nginx-fulland nginx-common, not just simply nginx. These are the packages that need to be removed.

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

To find the package that contains a particular program (e.g. nginx), you can always run dpkg -S $(which nginx).

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