Upload this script to Jamf, then add it to a policy and use the following parameters:
- Parameter 4: App Name, e.g.
TeamViewer
orTeamViewer.app
(either will work) - Parameter 5: package receipt ID, if you want the script to remove the package receipt, e.g.
com.teamviewer.teamviewer
.
Parameters 6 to 11 can be used to forget additional packages if required.
To find out the package receipt IDs, install the application on a test device from Jamf, and then run pkgutil --pkgs | grep -i teamviewer
, substituting a name that is likely to be in the package receipt name.
Note, this script does not delete Jamf's own package receipts (I never use those, so never really considered using them).
Is there a reason why, in line 15, you set
appName="$4"
? I'm testing the script locally before I add to Jamf and I kept getting "No application specified!" because I was obviously passing in the app name as the FIRST parameter rather than 4. Is this to account for some other parameters Jamf passes in, or just a typo? In line 19 you set it to $1(when i entered 3 dummy parameters and then the app name as the 4th parameter it all worked).