无法删除NGINX

我一直在尝试使用nginx作为php文件的网络服务器。 我来自Apache背景,但我想尝试一下。 我最近遇到了一个问题,需要切换回Apache。 我使用apt-get remove nginx删除了它。

这工作正常,我安装了Apache,生活很好。 我重新启动了我的电脑,不知何故nginx启动了。 我不明白。 我试图再次删除它,我收到了消息 :

 $ sudo apt-get remove nginx Reading package lists... Done Building dependency tree Reading state information... Done Package 'nginx' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 

如果我找程序( 截图 ):

 $ which nginx /usr/sbin/nginx 

有谁知道我做错了什么或下一步删除它会是什么?

我正在使用Xubuntu 14.04。

nginx是一个元数据包,因此您需要删除此软件包安装的任何内容。 如果做sudo apt-get autoremove不起作用,你可以运行sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras nginx-naxsi nginx-common (你可能只安装了这些软件包中的一个,但命令不应该失败)。

sudo apt-get remove --purge nginx*将删除已安装的任何内容并与nginx相关,包括配置文件。 它还将列出与正则表达式nginx*匹配且未安装的存储库中可用的包。

apt-get removeapt-get purge之间存在差异 。 --purge选项也会删除配置文件。 它对于干净的重新安装很有用。

输入命令:

 sudo apt-get remove --purge nginx* 

将导致:

 The following packages will be REMOVED: nginx-common* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? (Reading database ... 55416 files and directories currently installed.) Removing nginx-common ... Purging configuration files for nginx-common ...