How to uninstall OpenVPN?

I just recently tried to install OpenVPN following this which unfortunately failed because it couldn't connect to the server. The VPN was installed in spite of the errors during installation. The VPN is not working now so I want to uninstall it and I was wondering how.

Thanks in advance for your assistance.

Kernel: 6.4.7-zen1-3-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=3852ea8d-d2e5-4042-9059-7499964ca656 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=c0e91ddc-7c34-4cbd-9a88-09820fbb8ea9 loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.7 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X515JP_R565JP
v: 1.0 serial: <superuser required>
Mobo: ASUSTeK model: X515JP v: 1.0 serial: <superuser required>
UEFI: American Megatrends v: X515JP.308 date: 07/04/2022
ID-1: BAT0 charge: 36.3 Wh (100.0%) condition: 36.3/37.1 Wh (97.8%)
volts: 7.8 min: 7.8 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
status: not charging cycles: 3
Info: model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake
gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm
family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xBA
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB L3: 8 MiB
desc: 1x8 MiB
Speed (MHz): avg: 1459 high: 1500 min/max: 400/3900 scaling:
driver: intel_pstate governor: powersave cores: 1: 1500 2: 1179 3: 1500
4: 1500 5: 1500 6: 1500 7: 1500 8: 1500 bogomips: 23961
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Device-1: Intel Iris Plus Graphics G7 vendor: ASUSTeK driver: i915 v: kernel
arch: Gen-11 process: Intel 10nm built: 2019-21 ports: active: eDP-1
empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a52 class-ID: 0300
Device-2: NVIDIA GP108M [GeForce MX330] vendor: ASUSTeK driver: nouveau
v: kernel non-free: 535.xx+ status: current (as of 2023-07) arch: Pascal
code: GP10x process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s
lanes: 4 link-max: gen: 3 speed: 8 GT/s bus-ID: 02:00.0 chip-ID: 10de:1d16
class-ID: 0302 temp: 46.0 C
Device-3: Sonix USB2.0 HD UVC WebCam driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:3 chip-ID: 322e:2103
class-ID: 0e02
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_x11 driver: X: loaded: modesetting,nouveau
alternate: fbdev,intel,nv,vesa dri: iris,nouveau gpu: i915 display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: AU Optronics 0x61ed built: 2018 res: 1920x1080
hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
ratio: 16:9 modes: 1920x1080
API: OpenGL v: 4.6 Mesa 23.1.4 renderer: Mesa Intel Iris Plus Graphics
(ICL GT2) direct-render: Yes
Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403
API: ALSA v: k6.4.7-zen1-3-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.76 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
IF: wlo1 state: up mac: <filter>
Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) driver: btusb
v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:4
chip-ID: 8087:0aaa class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
v: 3.0 port: 4060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Local Storage: total: 476.94 GiB used: 37.09 GiB (7.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNU512GZ
size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: 002C temp: 36.9 C scheme: GPT
ID-1: / raw-size: 350 GiB size: 350 GiB (100.00%) used: 18.07 GiB (5.2%)
fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
used: 576 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 110.43 GiB size: 110.43 GiB (100.00%)
used: 19.02 GiB (17.2%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4
ID-4: /var/log raw-size: 350 GiB size: 350 GiB (100.00%)
used: 18.07 GiB (5.2%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
ID-5: /var/tmp raw-size: 350 GiB size: 350 GiB (100.00%)
used: 18.07 GiB (5.2%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.5 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
ID-2: swap-2 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/nvme0n1p2 maj-min: 259:2
System Temperatures: cpu: 62.0 C mobo: N/A gpu: nouveau temp: 46.0 C
Fan Speeds (RPM): cpu: 3200
Processes: 300 Uptime: 3h 33m wakeups: 1 Memory: total: 8 GiB note: est.
available: 7.5 GiB used: 4.26 GiB (56.7%) Init: systemd v: 254
default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
pm: pacman pkgs: 1801 libs: 518 tools: octopi,paru Shell: fish v: 3.6.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.28
Garuda (2.6.16-1):
System install date:     2023-07-15
Last full system update: 2023-08-04
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:

Have you read the instructions on the upstream GitHub site used?

It says:

When OpenVPN is installed, you can run the script again, and you will get the choice to:

Add a client
Remove a client
Uninstall OpenVPN

I don’t know if that works, but it seems the most viable way.
A suggestion for the future: when you don’t want or can’t use official packages in the repos or AUR, always make sure first that there is an uninstall script or procedure.


Thank you very much for your rapid response. I tried that but I received the following error:

Removed “/etc/systemd/system/[email protected]”.
Removed “/etc/systemd/system/”.
checking dependencies…
error: failed to prepare transaction (could not satisfy dependencies)
:: removing openvpn breaks dependency ‘openvpn’ required by networkmanager-openvpn
OpenVPN removed!

It might have worked (error message + successful confirmation are not a good sign for the reliability of the script :wink:).
Anyway, try removing networkmanager-openvpn

sudo pacman -Rns networkmanager-openvpn

Then relaunch the script.

And for the future, I'd start from here:

1 Like

Thanks for your information. I tried removing networkmanager-openvpn but I faced the following error:

checking dependencies…
error: failed to prepare transaction (could not satisfy dependencies)
:: removing networkmanager-openvpn breaks dependency ‘networkmanager-openvpn’ required by networkmanager-support

networkmanager-support should be left there, and has networkmanager-openvpn as dependency. Basically everything was available without that script.
So, what's the status of your system at the moment? If networking is ok, maybe you can simply try following the Arch Wiki...

I tried running the script and it tried to install OpenVPN from scratch again so I believe that OpenVPN is uninstalled now. The network is up and functioning well. The only problem is that networkmanager-openvpn is installed and I cannot remove it. I can leave it there if it does not cause any problem.

Thank you very much for your assistance again.

Don’t worry I too have networkmanager-openvpn in my system even though I never installed openvpn in my system ever before.

pacman -Qs networkmanager
local/libnm 1.42.6-1
NetworkManager client library
local/libnma 1.10.6-2
NetworkManager GUI client library (GTK3)
local/libnma-common 1.10.6-2
NetworkManager GUI client library (common files)
local/network-manager-sstp 1.3.1-2
SSTP support for NetworkManager
local/networkmanager 1.42.6-1
Network connection manager and user applications
local/networkmanager-fortisslvpn 1.4.0-2
NetworkManager VPN plugin for Fortinet SSLVPN
local/networkmanager-l2tp 1.20.8-1
L2TP support for NetworkManager
local/networkmanager-openconnect 1.2.10-1
NetworkManager VPN plugin for OpenConnect
local/networkmanager-openvpn 1.10.2-3
NetworkManager VPN plugin for OpenVPN
local/networkmanager-pptp 1.2.12-1
NetworkManager VPN plugin for PPTP
local/networkmanager-qt 5.108.0-1 (kf5)
Qt wrapper for NetworkManager API
local/networkmanager-strongswan 1.6.0-1
Strongswan NetworkManager plugin
local/networkmanager-support 1-6
Metapkg for useful NetworkManager packages
local/networkmanager-vpnc 1.2.8-3
NetworkManager VPN plugin for VPNC
local/nm-cloud-setup 1.42.6-1
Automatically configure NetworkManager in cloud
local/python-protonvpn-nm-lib 3.16.0-1
Official ProtonVPN NetworkManager Library, maintained by the ProtonVPN team.

As said, it should stay there, it won't hurt:

1 Like

Ok. Thank you very much for your support.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.