To completely uninstall NGINX from your system, follow the appropriate instructions based on your operating system:
For Ubuntu/Debian-based systems:
Stop the NGINX service:
sudo systemctl stop nginxDisable the NGINX service (so it doesn’t start on boot):
sudo systemctl disable nginxRemove NGINX and its dependencies: Run the following command to remove the NGINX package:
sudo apt-get purge nginx nginx-common nginx-full nginx-coreRemove any unused dependencies: After removing NGINX, you can clean up any unused packages: