@MBlank For Keynote, Number, or Pages a simple /bin/rm -rf on the application bundle will do the trick, e.g.:
/bin/rm -rf /Applications/Keynote.appGarageBand is more problematic as it will install a variable amount of media files. If you search Jamf Nation for articles on how to pre-install the Garageband media files it'll give you a good idea of what you'll need to remove.
You might also want to check and see if your users are actually using any of those apps before removing them, and here's an example EA to determine the last time GarageBand was launched:
#!/bin/sh
AppToCheck="/Applications/GarageBand.app"
result="2000-01-01 00:00:01"
if [ -d "${AppToCheck}" ]; then
result=$(mdls -name kMDItemLastUsedDate "${AppToCheck}" | cut -f 3,4 -d \\ )
fi
echo "<result>$result</result>" Configure that EA as a Script Input Type returning Date Data Type and you can use it in a Smart Group to determine if the app has been launched recently.
Thanks. Should each "rm" command be attached to a separate policy? Can they all be bundled together in one policy or script?
Thanks. Should each "rm" command be attached to a separate policy? Can they all be bundled together in one policy or script?
@MBlank If you're going to check to see if the apps have been used it'd be easier to have a separate policy to remove each app. If you're just looking to nuke all 4 with no check for them having been used, do it with a single policy.
yeah, a side task i have is to get a script to remove Garageband as it just takes up space on a corporate device that we don't even allow it to be launched... following with interest..
Just out of curiosity, why nuke Keynote, Numbers and Pages?
These are good apps, especially Keynote.
Just out of curiosity, why nuke Keynote, Numbers and Pages?
These are good apps, especially Keynote.
Disk space and users have other alternatives that are standard ie: Office 365.
Just out of curiosity, why nuke Keynote, Numbers and Pages?
These are good apps, especially Keynote.
If they are the pre-installed version, and you use Apple School/Business Manager to assign them to machines, it will give error trying to update to newer versions.