Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: Cannot delete VPN Profile

Hi to all, I'm having a problem on my macbook pro munting Lion.


I installed a new VPN profile to connect to a MacMini Server on System Preferences > Network, and I found there an old VPN profile that I don't want to use anymore. I tried to disable the service, but the delete button is greyed out, even if this service is active.


How can I remove this old VPN Profile?


Thanks in advance,


User uploaded file

Posted on

Reply
Question marked as Solved
Answer:
Answer:

I think I have an easier solution, at least in 10.8.2. I, too, had a VPN configuration that would not go away; the - button was grayed out. Here's what I did, though only step 2 is mandatory.


  1. In Terminal: networksetup -listallnetworkservices
  2. In Terminal: networksetup -removenetworkservice networkservice
  3. In Terminal: networksetup -listallnetworkservices


The first step shows you the names of your networkservices, like "old." The second step removes the network service. Be sure to spell the one you want to remove exactly as it's listed in the results of the first step. The third step confirms it is gone. Only Terminal is required, no XCode. The .plist will automatically update; no need to copy or delete. The remove command bypasses the GUI and removes the service whether or not the - button is grayed out.


Hope this helps. If you run man networkservices you will see many other Terminal commands that maniupulate items in the Network preference pane.

Posted on

Question marked as Helpful

Nov 12, 2014 8:09 PM in response to butrusgali In response to butrusgali

[EDIT: FINALLY FIGURED IT OUT! --> It's from hotspotshield. Go to your system preferences, and there should be an icon called "profiles". Click it and click the minus sign next to the hotspotshield certificate, type in your admin password, and the servers will erase from your networks".]

I've never seen these three servers in my networks in the many many years I've been on a macbook. Do you know why they appeared on your computer in the first place, or what they are?


The US Server on mine was called "ancientarmenia.us"


The GB Server on mine was called "jacketmagazine.us"


This last one the JP Server I can't delete because of IPv4... is called "brain photos.us"


Any idea what these are or why they are on our computers?

There’s more to the conversation

Read all replies

Page content loaded

Question marked as Helpful

Apr 28, 2012 3:35 AM in response to Francob In response to Francob

To delete a VPN Profile, go to System Preferences > Profile(s). Highlight the profile you want to delete then click the ➖ (minus) button under the list. You will have to confirm and type in your password to delete it. I just deleted a profile. Hope it helps.

Apr 28, 2012 3:35 AM

Reply Helpful (9)

Jun 3, 2012 5:26 AM in response to Francob In response to Francob

Creating a new Network location is the quickest but not most convenient solution here.

AliAR gave you the correct way of resolving the issue.


However, there is also a .plist file that needs to be edited if you want to resolve this issue entirely.


Open Terminal and run this command:

networksetup -listallnetworkservices


If you still have a VPN active it after deleting the profile it will appear on this short list.


Open a FInder Window. Go to -> /Library/Preferences/SystemConfiguration

There is a .plist file called preferences.

Make a copy of this file to your Desktop as a backup just incase.

Open the original file with Xcode and expand all of the directories/subdirectories.

Search for VPN and delete any VPN files.

Close Xcode, Reboot your Mac and you will have successfully deleted that VPN.


Hope it works for you!

Jun 3, 2012 5:26 AM

Reply Helpful

Oct 26, 2012 11:51 AM in response to Cheerschacha In response to Cheerschacha

Okay, I'm seeing the files now, but I don't know where to begin deleting and where to end. I've tried a couple of times using TextWrangler, since I don't have XCode, but it just screws up the network options - changes the icons, moves settings under wrong network type, etc. Anyone willing to help me understand .plists?

Oct 26, 2012 11:51 AM

Reply Helpful
Question marked as Solved

Nov 12, 2012 4:18 PM in response to niocosys In response to niocosys

I think I have an easier solution, at least in 10.8.2. I, too, had a VPN configuration that would not go away; the - button was grayed out. Here's what I did, though only step 2 is mandatory.


  1. In Terminal: networksetup -listallnetworkservices
  2. In Terminal: networksetup -removenetworkservice networkservice
  3. In Terminal: networksetup -listallnetworkservices


The first step shows you the names of your networkservices, like "old." The second step removes the network service. Be sure to spell the one you want to remove exactly as it's listed in the results of the first step. The third step confirms it is gone. Only Terminal is required, no XCode. The .plist will automatically update; no need to copy or delete. The remove command bypasses the GUI and removes the service whether or not the - button is grayed out.


Hope this helps. If you run man networkservices you will see many other Terminal commands that maniupulate items in the Network preference pane.

Nov 12, 2012 4:18 PM

Reply Helpful (3)

Dec 22, 2012 9:11 PM in response to Francob In response to Francob

Hi,

I tried this certainly working approach but I must be making a misake in Terminal.

The VPN service is printed in Terminal as (no quotes, of course)

"VPN (server.com)"


When I enter


networksetup -removenetworkservice VPN (server.com)

Terminal returns:

-bash: syntax error near unexpected token `('


I must make some stupid mistake.


Regards,

Twistan


Dec 22, 2012 9:11 PM

Reply Helpful

Dec 22, 2012 11:20 PM in response to Twistan In response to Twistan

Try this:


networksetup -removenetworkservice "VPN (server.com)"


Put quotes around the network service name. I think this is necessary because the parentheses cause problems with Terminal interpreting the UNIX command. I created a test network service on my machine, entered the command you did, and got the same error result you did. I then used quotes around the network service name and got the correct result. BTW, depending on your system settings, you may be asked to authenticate the deletion with your administrator password. If so, a dialog box will come up asking for it.


Dhalgren

Dec 22, 2012 11:20 PM

Reply Helpful

Dec 22, 2012 11:25 PM in response to Dhalgren In response to Dhalgren

Kindest thanks for your quick help.

I shall do as you said and report back.

We do have this issue on all our Macs (not just one misbehaving machine).

Once again, I am very grateful.

Regards,

Twistan


P.S.

I tried to "edit" the /Library/Preferences/SystemConfiguration/preferences.plist file but when I deleted the VPN entry all network locations were gone and I had to reconfigure from scratch.

Dec 22, 2012 11:25 PM

Reply Helpful

Dec 22, 2012 11:42 PM in response to Twistan In response to Twistan

That's unfortunate. Not to be preachy, but you shouldn't edit .plist files without making a backup copy. It looks like something went wrong and networkservices created a new, blank one, from scratch.


If you use TimeMachine, you might have a backup of the file and not know it, but it sounds as if you already recreated all your network services.


In my experience, doing a lot of direct .plist editing is fraught with problems. If there's something wrong with the file, I have no problem deleting it, knowing I will have to start over from scratch. Every time I've tried to directly edit a .plist, it hasn't worked out well. I prefer to let Terminal handle the editing and have found there are few Mac OS settings that Terminal can't modify.


Just my opinion. I'm sure there are others who are more adept at directly manipulating .plist files.

Dec 22, 2012 11:42 PM

Reply Helpful

Dec 23, 2012 12:32 AM in response to Dhalgren In response to Dhalgren

Hi,

using quotes did the trick and I could delete all obsolete VPN entries.

I admit that I am quite rusty as regards Unix/Terminal commands, an expert user would have known that parameters are parsed between quotes.


You are also right in regard to plist files. I had indeed made a backup copy and I copied that file back. I was very surprised that my locations were gone nonetheless.


Thanks again for your precious help.

Regards,

Twistan

Dec 23, 2012 12:32 AM

Reply Helpful
User profile for user: Francob

Question: Cannot delete VPN Profile