1

So i was trying to install PrivateInternetAccess on my computer and I found some instructions on their website, they had a download for a file but I couldn't figure out how to open the .sh file.

So i went to google and found these instructions. It said to perform the following commands:

sudo apt-get install curl network-manager-openvpn-gnome
wget https://www.privateinternetaccess.com/installer/pia-nm.sh
sudo bash pia-nm.sh

After doing these it installed the VPN but not how I wanted or thought it would. I wanted the application installed and this just put all the VPN connections in my network settings under VPN.

Anyway I figured out how to install the application like I wanted, and now I'm trying to undo where I installed OpenVPN and the other commands. I want to remove the VPN connections from my network settings.

I did the following:

sudo apt-get remove curl network-manager-openvpn-gnome

This seemed to remove the software. But it is still installed apparently. I did this to check if it was removed:

dpkg --list openvpn

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-=============================================

pi  openvpn              2.4.4-2ubuntu1. amd64           virtual private network daemon

(also, the pi next to open VPN was ii earlier, now its showing as pi. Dont know if thats important)

but it shows up anyway. So i noticed when i first installed Ubuntu that it had a VPN section in my network settings from the beginning. Is OpenVPN just part of the system? I tried to remove it again with

sudo dpkg -r openvpn
sudo dpkg --purge openvpn

Both of these failed saying there were dependency problems. I mean its not the end of the world if I cant remove it, but I'd like to know how to. Also can someone help me with understanding how to remove the VPN connections?

I dont know how to undo what I did and google isnt helping me very much with this. I know I could go through each connection inside my network settings and click the gear and then click remove, but i want to know how to undo it from terminal.

1

I don't know why you used dpkg to remove OpenVPN, in that case try again but with apt this time.

First, fix any dependencies problem that you might occur, by adding --fix parameter on apt.

sudo apt -f install

Finally, remove openvpn with all their dependencies.

sudo apt purge openvpn

Please report back any error, if any.

  • Okay cool, this worked and now when i do: dpkg --list openvpn it doesnt show up. I used dpkg because i saw it in youtube videos. Should i just use apt instead? im just trying to learn the best way to do things. – Rusynic Mar 11 at 17:50
  • I keep trying to mark this as the answer by clicking the check mark but it won't let me. And i tried to vote up on the other answer because it was also helpful but it wont let me do that either. I will try again later. – Rusynic Mar 11 at 18:08
  • @Rusynic why do you un-accept the answer ? – Jim Mar 14 at 12:47
  • I dont know what im doing. I am trying to select it as the answer. – Rusynic Mar 24 at 4:05
0

• To delete your OpenVPN profiles via shell,

ll /etc/NetworkManager/system-connections/

You'll see all your saved connections. Use command sudo rm -vf connection_name to delete the OpenVPN profiles you want, you can use regular expressions like sudo rm -vf US* to remove all the profiles that start with "US".

pi from dpkg --list openvpn says the state of the openvpn package, p = the desired state (marked for action) of openvpn which is purged (that you did), i = the current state of the package which is installed (meaning it's not removed yet). ii meant i = desired state installed, i = current state installed.

• Depending on how you installed openvpn there are many possibilities, it's possible that PIA is interfering with the package or PIA is a opnvpn client and depends on it. Try to fix broken packages with sudo apt --fix-broken install, completely remove PIA, then remove openvpn. Anyway if it doesn't work, try this command sudo dpkg --purge --force-all openvpn. If all fails, then you might have to search & manually delete all binary files of openvpn.

• You might also want to consider reinstalling curl, it comes pre-instaled with Ubuntu and an important download utility, sudo apt install curl

  • This worked also, the terminal displayed each connection being removed. I used sudo rm -vf PIA* because each connection was marked with PIA at the front. After that i restarted the network manager with sudo service network-manager restart and then all the connections were gone from the VPN menu. Much appreciated. Also thanks for explaining what pi, ii and all that means. Now i know what im looking at. – Rusynic Mar 11 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.