How to remove NGINX from Ubuntu

  188 views   5 months ago Ubuntu

After removing nginx server, sometimes you might wonder that it still runs on /var/www/html folder when you run http://localhost in your browser.

In this article, we will discuss how to completely remove Nginx server from Ubuntu.

In your Terminal, first run the below command to install nginx config files and remove from Ubuntu.

sudo apt-get purge nginx nginx-common

After running the above command, use below command in order to remove all dependencies used by nginx which are no longer required.

sudo apt-get autoremove

Further, you can also remove nginx config files which are not required.

rm -rf /etc/nginx

This way, you can completely remove nginx web server from Ubuntu system.

Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]