Stop the Libreswan service:

bash

sudo systemctl stop ipsec 

The service name for Libreswan is typically ipsec.Disable the service from starting at boot:

bash

sudo systemctl disable ipsec 

This command removes the symlinks that start the service automatically when the system boots up.Verify the service status (optional):

bash

sudo systemctl status ipsec 

The output should indicate that the service is "inactive (dead)". 

Gist +4

Method 2: Uninstall Libreswan

If you no longer need Libreswan, you can completely remove the package from your system. 

bash

sudo apt purge libreswan sudo apt autoremove

