Wednesday, January 29, 2025

How to Uninstall WireGuard

How to Uninstall WireGuard
If you need to fully uninstall WireGuard from Debian 12, follow these steps:

1. Stop the WireGuard Service
First, ensure that the WireGuard service has stopped:

sudo systemctl stop wg-quick@wg0

2. Disable WireGuard Autostart
If WireGuard is set to start automatically, disable it:

sudo systemctl disable wg-quick@wg0

3. Uninstall WireGuard Packages
Uninstall WireGuard and its tools using apt:

sudo apt remove --purge wireguard wireguard-tools

4. Delete Configuration Files
Remove WireGuard configuration and key files:

sudo rm -rf /etc/wireguard

5. Clean Up Remaining Dependencies
Sometimes, there might be unused dependencies left after uninstallation. Clean them up with:

sudo apt autoremove --purge

6. Reboot (Optional)
To ensure all configurations and services are fully cleared, it’s recommended to reboot the system:

sudo reboot

This will ensure that WireGuard is completely removed from your system

Add comment

Fill out the form below to add your own comments