Posted on 04-28-2016 08:26 AM
Hi All,
We have a OneDrive Install pkg - now the file is indexed, but when I got to Casper and Action I still don't get an uninstall option? Any ideas on how I remove "OneDrive for Business.app"
Thanks
Simon
Posted on 04-28-2016 08:39 AM
You have to edit the package in either Casper Admin or within the pkg details in the JSS to check the box labeled "Allow package to be be uninstalled" Once you do that and save the changes, back in your policy, the uninstall option will be available.
Be warned though that not all packages lend themselves well to be run as an uninstall. Do thorough testing to be sure its doing what you expect.
Posted on 04-28-2016 09:26 AM
Another thing to look for are uninstall scripts provided by vendors. Often those can be shaped to work in the JSS and do a better job...
Posted on 04-29-2016 05:36 AM
Just to clarify, while you can certainly run the indexing process on a .pkg, it provides no benefit and does NOT allow for integrated uninstall. Only a .dmg can be indexed for removal. a .pkg is a flat file with no information (available to the JSS) about what it will install and where. Now, I have no experiance with uninstalling OneDrive but a possible method would be to
• Run an indexed snapshot in composer, to capture the OneDrive installation and save that install as a .dmg, which you can index in Casper Admin. Don't use this for installation (the .pkg will almost certainly be mroe reliable and faster) but you will now have the ability to check the "Allow package to be uninstalled" box that @mm2270 mentions.
or
• From what I've read on Microsofts website. OneDrive should be super simple to uninstall. I would probably just write a super simple script for it. Here's a one liner: (mind you, I'm not testing this, so don't just copy past and distribute...)
rm -rf /Applications/OneDrive.app
or something a little more complete (if you wanted to get the Application Support files)
#!/bin/sh
#!/bin/bash
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
rm -rf /Applications/OneDrive.app
rm -rf /Users/$loggedInUser/Library/Application Support/OneDriveBusiness
rm -rf /Users/$loggedInUser/Library/Logs/OneDriveBusiness-*
exit 0
I don't know if it has a kernel extension... removal there is a little different as you'd want to unload the .kext or at least reboot after. Mind you, I am not a model for proper script writing so someone may make some really great additional suggestions or corrections. The good news, is that this one is very easy!