Command line or Keyboard Maestro control of Launch Agents?

My uni has graced me with a new VPN client.
Of course I had the old one all automated up nicely with Keyboard Maestro, my Stream Deck, etc.
The only way I can see to unload this thing is to run CleanMyMac X, go into Launch Agents, and disable the two that are currently enabled, or vice-versa.
I’ve found various things online about using launchctl to load/unload, etc. but nothing has worked for me.
e.g. sudo launchctl unload system/
No combination of enable or start will enable them when disabled. The load command wants a config file of some sort.

Thanks for any ideas.

Step 1: Where are the files stored and what are their exact names?

Probably either in ~/Library/LaunchAgents/ or /Library/LaunchDaemons or /Library/LaunchAgents

Names should end with .plist.

Away from the computer, but did find those.
Something like and

I’ve tried thing like this with or without sudo), to no avail.
Also tried run, stop, enable, disable, kickstart.

Stop PanGPS
launchctl unload /Library/LaunchAgents/

Stop GlobalProtect (i.e. PanGPA)
launchctl unload /Library/LaunchAgents/

Start PanGPS
launchctl load /Library/LaunchAgents/

Start GlobalProtect (i.e. PanGPA) 
launchctl load /Library/LaunchAgents/

Not command line, but my favorite app for controlling launch agents: LaunchControl: The launchd GUI

+100 for the recommendation to use LaunchControl.

You might need the -w flag after load

For anything in /Library/* you should use sudo

I’m genuninly curious as to what you’re trying to accomplish.

1 Like

Perhaps it’s irrational, but I don’t like VPNs and other software that can monitor my network activity running when I’m not connecting to that particular network.