Stop Cisco from Starting Up Automatically on Mac

2 minute read

Published:

Problem: After installing Cisco VPN, it always automatically startup when I login. It’s annoying.

[TOC]

TL;DR

Disable Cisco from autostartup from terminal

launchctl unload -w /Library/LaunchAgents/com.cisco.anyconnect.gui.plist

Comparing different solutions

1. Official Solution by Apple which doesn’t work

System Preferences > Users & Groups > Login Items

Can’t find cisco there.

Reference: Set your Mac to automatically log in during startup

2. Brute force (don’t recommend)

Removing /Library/LaunchDaemons/com.cisco.anyconnect.gui.plist

Reference: This answer

3. Best way: Use launchctl

Load/unload a auto startup item

 launchctl load -w /Library/LaunchAgents/com.cisco.anyconnect.gui.plist # enable
 launchctl unload -w /Library/LaunchAgents/com.cisco.anyconnect.gui.plist # disable

Check if it auto starts

launchctl list | grep -i cisco

Reference: This answer (recommend to read)

Explanation

  1. The Cisco application did not register in the Mac login startup items but in /Library as a service. So we can’t find it from Apple’s control panel user interface.

  2. The Library/LaunchDaemons/ folders are sililar as init.d on Linux, and launchctl is like systemd on Linux. Always use interface and don’t mess up with the actual files.