It's also possible to use the official interface to disable a LaunchDaemon:
launchctl disable <service-name>
e.g.,
launchctl disable gui/501/com.microsoft.OneDriveLauncher
will disable Microsoft's OneDrive for the user with UID 501
(the default UID for the user created at install time; run "id" to see what your UID is).
The advantage of this method is that it disables the application for you, but not for other users of the same system, if any.
If you don't know what the service name for your application is, then run launchctl list
. This shows a list of all the labels, but not the service labels; e.g., in the above example, it would show com.microsoft.OneDriveLauncher
, but not the gui/501/
part. You need to add that yourself.
The man page (man launchctl
) has more details.