ubuntuサーバーはnginxサーバーを完全にアンインストールします
Ubuntu Server Completely Uninstall Nginx Server
次のコマンドを使用します。
1.nginxのインストール依存関係を確認します
dpkg --get-selections|grep nginx
2.削除コマンドを実行します
sudo apt-get --purge remove nginx nginx-common nginx-core
3.削除が成功したかどうかを確認します。
dpkg --get-selections|grep nginx
4.nginxをインストールします
Command installation: sudo apt-get install nginx