I have some problems with nginx
configuration. I found the problem and I need to uninstall it. I used the commands
apt-get remove nginx
and
apt-get purge nginx
But the nginx
is still runnning. Can someone help me?
Find out what file is running:
pgrep nginx | xargs -I{} readlink -f /proc/{}/exe
Then you can expand on that to find out which package that file (or those files) belong to:
dpkg -S $(pgrep nginx | xargs -I{} readlink -f /proc/{}/exe | uniq)
In my case that highlights the nginx-full
package but it might be you find a version of Nginx you manually installed (not from packages) that you now need to manually remove.
../local/..
directory that probably means you installed it manually (compiled from source, etc). The proper removal method really depends on how you installed it.