Hi Team, Facing issue with the below question: On `controlplane` host we have ` . . .

Gowtham Chinta:
Hi Team, Facing issue with the below question:

On controlplane host we have nginx service running which isn’t needed on that system. Stop the nginx service and remove its service unit file. Make sure not to remove nginx package from the system.

Gowtham Chinta:
what command should I use to just remove nginx, but not removing nginx package from the system.

unnivkn:
try this: k delete svc my-svc -n my-ns k delete -f svc.yaml

Vinay Kumar:
systemctl remove nginx

Vinay Kumar:
This removes service file but package will be retained

Gowtham Chinta:
@Vinay Kumar, I checked and I don’t see any option “systemctl remove”.

Gowtham Chinta:
@ather.tahir786: can you please help.

Gowtham Chinta:
@Vijin Palazhi

Vinay Kumar:
in the labs we do use systemctl

Vinay Kumar:
systemctl disable nginx

Vinay Kumar:
Sorry for wrong command

Gowtham Chinta:
Hi @Vinay Kumar systemctl disable nginx. will only disable nginx but it won’t remove unit files. but here it is asking us to remove the unit files.

@Mumshad Mannambeth @Vijin Palazhi: Can you please look into this issue?

Vinay Kumar:
ok understood

Vinay Kumar:
why not remove service file?

Gowtham Chinta:
like apt remove nginx?

Vinay Kumar:
rm /lib/systemd/system/nginx.service

Gowtham Chinta:
sure vinay I will try it

Vinay Kumar:
apt remove nginx will remove the package from the system

Gowtham Chinta:
yup apt remove nignx will remove. so I was skeptic and was looking for another solution

M S:
but the question says not to remove the package, isnt it?!