Hi ,
We would like to remove the mac apps pages and numbers from MAC x for 'n' numbers of users, can I have any removal script to run via policy ?
Any script to remove pages and Numbers casper policy?
Best answer by stevewood
@parasarann the one downside to using a brute force method like that is on machines that do not have iWork '09 installed you will get errors in your script that could translate to a failure in the JSS. There are two ways (I'm sure many more) that you can get around this. You can either use an if .... then loop in the script to first test for the existence of the iWork '09 folder before attempting to delete, or you could use the method @talkingmoose showed, but apply to the Applications folder. I like this second method better because it's a little cleaner in the script and will get any version of Pages & Numbers. This would look like this:
#!/bin/sh
# Remove Numbers app
find /Applications -name Numbers.app -type d -exec rm -r {} +
# Remove Pages app
find /Applications -name Pages.app -type d -exec rm -r {} +
exit 0
That will use Find to locate those two apps anywhere in the /Applications tree of folders, and remove those apps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
