Having decided to make Sophos an optional install for our
organization, I also wanted to make sure users had a way to remove it
cleanly. (If anyone knows how to let non-admins remove threats
detected in their own files/disks, I'd love to know how. We don't
currently run our own console.)
Sophos provides a pkg uninstaller, located at /Library/Sophos Anti-
Virus/Remove Sophos Anti-Virus.pkg. This is payload-free and has
binary pre/postflights to perform the uninstall. I've tested it at the
loginwindow and running as a non-admin, and it seems to work, whether
Sophos has since updated itself or not.
I've added these keys to my pkginfo to allow for the uninstall:
<key>uninstall_method</key>
<string>uninstall_script</string>
<key>uninstallable</key>
<true/>
<key>uninstall_script</key>
<string>#!/bin/sh
/usr/sbin/installer -pkg /Library/Sophos\ Anti-Virus/Remove\ Sophos\
Anti-Virus.pkg -target /
exit 0
</string>
Sophos does have a KB article on this, updated Feb. 2011, so this
seems to be supported. Note that the path they specify is, however,
incorrect. And, since Sophos updates without your control, there's no
guarantee this uninstall pkg will remain there.
http://www.sophos.com/support/knowledgebase/article/14179.html
Hope that's helpful for someone. I'd be interested to hear others
thoughts on any issues they've run into with Sophos in their
organization.
Tim
> <string>com.sophos.autoupdate</string>
> <key>CFBundleName</key>
> <string>Sophos AutoUpdate</string>
> <key>CFBundleShortVersionString</key>
> <string>7.2.0</string>
> <key>path</key>
> <string>/Library/Sophos Anti-Virus/SophosAutoUpdate.app</string>
> <key>type</key>
> <string>application</string>
> </dict>
> </array>
>
> You can generate such an array using /usr/local/munki/makepkginfo, like so:
>
> /usr/local/munki/makepkginfo -f "/Applications/Sophos Anti-Virus.app" -f "/Library/Sophos Anti-Virus/SophosAntiVirus.app" -f /Library/Sophos Anti-Virus/SophosAutoUpdate.app
>
> Using the -f flag, I pointed makepkginfo at several of the applications installed by Sophos AV.
> When munki checks for installs, it will look to see if these applications exist, and if they are at least the version numbers specified. If those tests pass, munki will consider Sophos AV installed, and won't offer to install it again.
>
> See also the FAQ athttp://
code.google.com/p/munki/wiki/FAQ-- the question "munki successfully installed some software, but now each time munki runs, it wants to install the software again. Why is this?" is related to this issue.