0

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?

1 Answer 1

0

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.

2
  • When I wrote the first command I got as response "/usr/local/nginx/sbin/nignx" .On the other hand when I have written the second command I got as response "dpkg-query:no path found matching patter /usr/local/nginx/sbin/nginx". What do I have to do now? Which package I have to remove? Apr 2, 2015 at 11:20
  • 1
    Because it's in a ../local/.. directory that probably means you installed it manually (compiled from source, etc). The proper removal method really depends on how you installed it.
    – Oli
    Apr 2, 2015 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .