Posted on 10-26-2020 09:02 AM
Hello Folks,
i am trying to uninstall Global protect from all machines. Does anyone know how to accomplish this task. Any tips or advice appreciate it.
Thank you
Posted on 10-26-2020 10:00 AM
Palo Alto has an article on their site that may help.
https://docs.paloaltonetworks.com/globalprotect/5-0/globalprotect-app-user-guide/globalprotect-app-f...
Glancing over it, it looks like they recommend using the installer to choose the uninstall option when running it. Which means you will need to script an uninstall using the installer
command line and a ChoiceChangesXML to specify the uninstall option.
I only have an old copy of GlobalProtect at the moment, from 2019, but running the installer -showChoicesXML
option on it shows me the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>childItems</key>
<array>
<dict>
<key>childItems</key>
<array/>
<key>choiceDescription</key>
<string>Select this to install GlobalProtect in your computer.</string>
<key>choiceIdentifier</key>
<string>globalprotectid</string>
<key>choiceIsEnabled</key>
<true/>
<key>choiceIsSelected</key>
<integer>1</integer>
<key>choiceIsVisible</key>
<true/>
<key>choiceSizeInKilobytes</key>
<integer>13652</integer>
<key>choiceTitle</key>
<string>GlobalProtect</string>
<key>pathsOfActivePackagesInChoice</key>
<array>
<string>file://localhost/Users/mikem/Documents/Installers/GlobalProtect.pkg#globalprotect.pkg</string>
</array>
</dict>
<dict>
<key>childItems</key>
<array/>
<key>choiceDescription</key>
<string>Select this to uninstall NetConnect from your computer.</string>
<key>choiceIdentifier</key>
<string>uninstallnetconnectid</string>
<key>choiceIsEnabled</key>
<false/>
<key>choiceIsSelected</key>
<integer>0</integer>
<key>choiceIsVisible</key>
<false/>
<key>choiceSizeInKilobytes</key>
<integer>4</integer>
<key>choiceTitle</key>
<string>Uninstall NetConnect</string>
<key>pathsOfActivePackagesInChoice</key>
<array>
<string>file://localhost/Users/mikem/Documents/Installers/GlobalProtect.pkg#uninstallnetconnect.pkg</string>
</array>
</dict>
<dict>
<key>childItems</key>
<array/>
<key>choiceDescription</key>
<string>Select this to uninstall GlobalProtect from your computer.</string>
<key>choiceIdentifier</key>
<string>uninstallglobalprotectid</string>
<key>choiceIsEnabled</key>
<true/>
<key>choiceIsSelected</key>
<integer>0</integer>
<key>choiceIsVisible</key>
<true/>
<key>choiceSizeInKilobytes</key>
<integer>4</integer>
<key>choiceTitle</key>
<string>Uninstall GlobalProtect</string>
<key>pathsOfActivePackagesInChoice</key>
<array>
<string>file://localhost/Users/mikem/Documents/Installers/GlobalProtect.pkg#dummy.pkg</string>
</array>
</dict>
</array>
<key>choiceIdentifier</key>
<string>__ROOT_CHOICE_IDENT_GlobalProtect</string>
<key>choiceIsEnabled</key>
<true/>
<key>choiceIsSelected</key>
<integer>-1</integer>
<key>choiceIsVisible</key>
<true/>
<key>choiceSizeInKilobytes</key>
<integer>0</integer>
<key>choiceTitle</key>
<string>GlobalProtect</string>
<key>pathsOfActivePackagesInChoice</key>
<array/>
</dict>
</array>
</plist>
I see a few 'uninstall' options listed, so theoretically you should be able to put together a choice changes xml file to direct it to that will run the uninstall options.
I can't give you the options right here, but if you have trouble getting it together, post back and I'll try to help with building the proper xml.
Posted on 10-26-2020 11:01 AM
Thank you mm2270, i will look into it and see how it go, also can i simply create a policy>File and process>execute command sudo /Applications/GlobalProtect.app/Contents/Resources/uninstall_gp.sh. will that work?
Posted on 10-26-2020 11:07 AM
Ah, yeah, if there's an existing uninstall script in the app Resources folder, then that's probably the way to go. Test of course, but if that works, then that's probably easier than crafting the ChoiceChangesXML file and pushing that along with the package and running it.
Posted on 10-26-2020 11:26 AM
The /Applications/GlobalProtect.app/Contents/Resources/uninstall_gp.sh
script is identical to the postinstall
script which runs when you use the gp_uninstall.pkg
option for the Globalprotect installer, so definitely seems like the best option.
Note: If you have the GlobalProtect System Extension installed, running the removal script will display an authentication prompt asking the user to authorize its removal.
Posted on 10-26-2020 12:46 PM
Thank you Sdagley/mm2270. i appreciate your input. i will give it a try today.
Posted on 11-19-2020 10:35 AM
Posted: 10/26/2020 at 2:46 PM CDT by Kavanmavati Thank you Sdagley/mm2270. i appreciate your input. i will give it a try today.
Did you get this to work? I need to update the client on our fleet, and it looks like I may have to remove the old one first.
Posted on 12-24-2020 03:26 AM
I'm having similar issues and have found the gp_uninstall.sh in the GlobalProtect.app is identical to the uninstall script used in the GlobalProtect.pkg
@sdagley Is there a way to get the system extension uninstalled silently without the authentication prompt popping up - our users are standard users
Posted on 12-24-2020 12:24 PM
@jamesdurler The prompt on uninstalling a System Extension is imposed by Apple, and at this time there's no workaround I've heard of. Probably worth opening a support case with Apple given that for MDM managed Macs one can eliminate the prompt for installation, so logically one should be able silently remove as well.