Skip to main content

I've seen some discussions already dotted around but not much has helped so far.



We have successfully used a script that will remove the SSID from a Mac but after a reboot, you are still left with the SSID details in Keychain.



Is there a way (script?) to remove this? I want to test it using terminal first.

For WPA2 Enterprise networks, this has worked for us:



su "$loggedInUser" -c '/usr/bin/security delete-generic-password -s com.apple.network.eap.user.item.wlan.ssid.<SSID NAME>'


I'm using it in this script.



Someone might be able to chime in on the name of the keychain item for a standard WPA/WPA2 SSID, which you can just replace the com.apple.network.eap.user.item.wlan.ssid.<SSID NAME> portion with.


wpa2 system based conenction



sudo security delete-generic-password -l "SSIDNAME" "/Library/Keychains/System.keychain"


Dont ask me how to delete ones synced to iCloud though. @geoffrepoli


Reply