How to Uninstall Nginx on Centos7


Nginx web server is alternative web server to Apache. Nginx popularity now growing up because high performance while maintaining low memory usage.Most of the webmaster, administrator and programmer still prefer to user Apache over Nginx as a web server because of some reason, not many Webmaster, System administrator comfortable with Nginx Configuration.Apache has built-in support for a wide range of web programming languages, including Perl, PHP and Python.

in this tutorial we share how to uninstall Nginx on Centos7

Step 1

Firstly stop nginx service with auto startup

systemctl stop nginx.service

systemctl disable nginx.service

Step 2
Remove Nginx user with Directory

Userdel -r nginx

Step 3

Remove Nginx related all file.

rm -rf /etc/nginx

rm -rf /var/log/nginx

rm -rf /var/cache/nginx/

Step 4
Remove the created nginx.service script under systemd

rm -rf /usr/lib/systemd/system/nginx.service



Related posts

Leave a Comment