Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to switch from a development version to a stable one.

I installed nginx from source with:

sudo make install

I tried sudo make uninstall but it doesnt work.

How can I uninstall nginx?

share|improve this question

migrated from stackoverflow.com Oct 16 '11 at 17:07

This question came from our site for professional and enthusiast programmers.

Duplicate: superuser.com/questions/281920/… (can't vote to close as dupe from another site, but voting to close as off topic) – Wooble Oct 14 '11 at 14:43
up vote 10 down vote accepted

To uninstall:

sudo rm -f -R /usr/local/nginx && rm -f /usr/local/sbin/nginx



share|improve this answer

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

share|improve this answer

This help for me:

 make deinstall clean

 ;make===>  Deinstalling for nginx
 ===>   Deinstalling nginx-1.6.2_1,2
 Updating database digests format: 100%
 Checking integrity... done (0 conflicting)
 Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

 Installed packages to be REMOVED:

 The operation will free 1 MiB.
 [1/1] Deinstalling nginx-1.6.2_1,2...
 [1/1] Deleting files for nginx-1.6.2_1,2: 100%
 ===>  Cleaning for nginx-1.6.2_1,2

And - done.

share|improve this answer
cd /usr/ports/www/nginx
make deinstall
share|improve this answer
the OP din't say it's on a FreeBSD host – warl0ck Nov 4 '12 at 23:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.