How to uninstall nginx (installed from source)?
To uninstall:
sudo rm -f -R /usr/local/nginx && rm -f /usr/local/sbin/nginx
Source:
http://articles.slicehost.com/2007/12/3/ubuntu-gutsy-installing-nginx-from-source
Stop the service first:
sudo service nginx stop
Our compiled-from-source files:
sudo rm -rf /etc/nginx /etc/default/nginx /usr/sbin/nginx* /usr/local/nginx /var/run/nginx.pid /var/log/nginx
The Debian scripts that came with the apt-get version:
sudo rm -rf /etc/init.d/nginx /etc/logrotate.d/nginx /var/lib/update-rc.d/nginx
Your static content:
sudo rm -rf /var/www
Disable the startup daemon:
sudo update-rc.d -f nginx disable
source http://elinux.org/RPi_Nginx_Webserver