I have compiled nginx(1.13.6) on my ubuntu server by cloning and installing nginx from git. I want to recompile it with additional modules. When I try to remove nginx using:
sudo service nginx stop
sudo rm -f -R /usr/local/nginx && rm -f /usr/local/sbin/nginx
I get the following output when sudo service nginx status
is entered which shows that nginx has not been fully removed.
● nginx.service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:19] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: nginx.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
systemd[1]: [/lib/systemd/system/nginx.service:6] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: [/lib/systemd/system/nginx.service:19] Unknown lvalue 'KillStop' in section 'Service'
systemd[1]: nginx.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
How can I remove nginx completely to recompile it from scratch?