Installed Nginx with passenger-install-nginx-module. How do I uninstall it?
Asked Answered
A

3

9

I'm on Mac OSX. Nginx is installed in /opt/nginx.

How do I uninstall it? Any thoughts?

Adiabatic answered 1/10, 2011 at 23:9 Comment(1)
How did you install Nginx?Cerebrospinal
S
2
 gem uninstall passenger

will remove passenger and all these dependencies

passenger, passenger-install-apache2-module, passenger-install-nginx-module, passenger-config, passenger-status, passenger-memory-stats, passenger-make-enterprisey

Stalk answered 18/11, 2011 at 7:42 Comment(2)
gem uninstall passenger did not remove the /opt/nginx on my ec2-ubuntu-12.04LTS instance. I had to manually remove it after the gem uninstall passenger command.Waterscape
It won't uninstall nginx. It'll only remove the passenger files. Remove the passenger dependencies from the nginx.conf and nginx won't try to use Passenger.Fibrosis
F
1

Passenger's documentation covers this:

To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you’ve done this, you need to remove the Phusion Passenger files.

  • If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.
  • If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.
  • If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.
  • If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.

Nginx does not have to be recompiled after uninstalling Phusion Passenger. Altough Nginx will contain the Phusion Passenger Nginx module, the module will not do anything when all Phusion Passenger configuration directives are removed.

At that point you can remove nginx by running

sudo rm -rf /opt/nginx

if you installed it using source.

Use your package manager to remove it if you installed it that way.

Fibrosis answered 20/7, 2015 at 21:4 Comment(0)
W
0

Run following command from your terminal:

For Debian/Ubuntu

sudo apt-get remove -y passenger

Red Hat/CentOS

sudo yum remove -y passenger

macOS + Homebrew

brew uninstall passenger

Ruby gem

gem uninstall passenger
Wabash answered 9/4, 2018 at 4:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.