本文主要是介绍2021-07-16ubuntu 18.04 卸载 nginx,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
仅适用于使用 apt install 方式安装的 nginx
-
卸载 nginx
sudo apt remove nginx nginx-common -
删除配置文件
sudo apt purge nginx nginx-common -
删除Nginx依赖包
sudo apt autoremove -
删除
sudo apt remove nginx-full nginx-common -
确认nginx 服务不存在
sudo service nginx restart
Failed to restart nginx.service: Unit nginx.service not found. -
确认 nginx 安装包是否清理干净
dpkg -l | grep ^nginx如果发现还有残留,可以试试以下命令清理
dpkg -l | grep ^nginx | cut -d’ ’ -f3 | sudo xargs dpkg --purge
这篇关于2021-07-16ubuntu 18.04 卸载 nginx的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!