The Lingering VPN Daemon
If you use a corporate laptop or frequently connect to enterprise networks, you have likely installed the Cisco AnyConnect Secure Mobility Client on your Ubuntu system. When installed, it creates a background systemd service called vpnagentd. This daemon runs continuously in the background, communicating with the AnyConnect GUI and managing the encrypted VPN tunnels.
However, many users only need the VPN for a few hours a week to check specific corporate emails, or perhaps they have left the company but haven’t uninstalled the software. Having the vpnagentd service running 24/7 on your personal time is unnecessary. It consumes memory, constantly monitors network interfaces, and can sometimes conflict with other local networking tools (like Docker or local VMs). If you only want the VPN to run when you explicitly launch it, you should disable the automatic daemon.
How to Disable the Cisco VPN Agent
You can stop the daemon from automatically loading on boot using systemctl.
- Open your Ubuntu Terminal.
- Stop the currently running VPN daemon immediately:
sudo systemctl stop vpnagentd.service
- Disable the service so it does not automatically start the next time you boot your computer:
sudo systemctl disable vpnagentd.service
Important Note: Because you disabled the background service, the Cisco AnyConnect GUI will no longer work if you simply click the icon. When you actually do need to connect to the VPN, you must manually start the daemon first by running sudo systemctl start vpnagentd.service before opening the application.