怎么彻底卸载nginx

    技术2022-07-17  71

    1.重中之重就是先要将nginx服务给关闭 sudo service nginx stop 2.查看是否还有残留的nginx进程 ps -ef | grep nginx

    如果还残留有nginx进程,则将其kill掉。

    sudo pkill -9 nginx 3. 卸载nginx sudo apt-get --purge remove nginx

    然后卸载nginx附带的程序

    sudo apt-get autoremove 4. 查看残留nginx程序 dpkg --get-selections|grep nginx libnginx-mod-http-geoip install libnginx-mod-http-image-filter install libnginx-mod-http-xslt-filter install libnginx-mod-mail install libnginx-mod-stream install nginx-common install nginx-core install

    然后使用命令

    sudo apt-get --purge xxxxxxx

    将刚刚查出的所有残留程序都卸载 然后再此使用4步骤中的查看命令查找,如果没有结果,则说明卸载干净了。

    Processed: 0.009, SQL: 9