How to disable macOS services

The command line tool "launchctl" can be used to manage agents and services.

I need to disable a few services in my old MacBook. That's why I am writing this post.

List services

sudo launchctl print system

The print sub-command helps us view the services with the correct name that we can disable.

Disable service

After checking the service list in the previous command output, I find that I can disable the location service (I don't want location service on my laptop) and the Game controller (I don't play games on laptop).

sudo launchctl disable system/
sudo launchctl disable system/