Uninstalling the Cloud Agent (APFS)
To uninstall the Cloud Agent through the console, go to Computers page, select at least one computer and click Maintenance > Uninstall Cloud Agent.
To uninstall the Cloud Agent on Mac, create a file with the following script and run it as sudo <filename>:
#!/bin/sh
# Should be root to run this script
if [ "$EUID" != "0" ]; then
echo "Error: script must be run as root (use sudo)." 1>&2
exit 1
fi
# if the user didn't give a volume assume the boot (i.e. root) volume
if [ "$1" = "" ]; then
MCAVOLUME="/"
else
if [ -d "/Volumes/${1}" ]; then
MCAVOLUME="/Volumes/${1}"
else
MCAVOLUME="${1}"
fi
fi
if [ -d "${MCAVOLUME}" ]; then
CanRemoveStorageSpace=1;
if [ -d "${DFXVOLUME}/Library/PrivilegedHelperTools/com.faronics.deepfreezed.app" ]; then
BuildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${DFXVOLUME}/Library/PrivilegedHelperTools/com.faronics.deepfreezed.app/Contents/Info.plist");
IFS='. ' read -r -a DFVersion <<< "$BuildVersion"
if [ "${DFVersion[2]}" -eq 520 ]; then
echo "Error: Uninstall Deep Freeze before Cloud Agent can be uninstalled."
exit 1;
fi
if [ "${DFVersion[2]}" -eq 220 ]; then
CanRemoveStorageSpace=0;
fi
fi
if [ "${CanRemoveStorageSpace}" -eq 1 ]; then
echo "Uninstalling StorageSpace from \"${MCAVOLUME}\"."
launchctl bootout system "${MCAVOLUME}/Library/LaunchDaemons/com.faronics.storagespaced.plist"
rm -rf "${MCAVOLUME}/Library/LaunchDaemons/com.faronics.storagespaced.plist"
rm -rf "${MCAVOLUME}/Library/PrivilegedHelperTools/com.faronics.storagespaced"
pkgutil --forget "com.faronics.pkg.storagespace" --volume "${MCAVOLUME}"
rm -rf "${MCAVOLUME}/Library/Preferences/com.faronics.storagespaced.plist"
diskutil apfs deleteVolume "${MCAVOLUME}/Library/Application Support/Faronics/Private/StorageSpace"
rm -rf "${MCAVOLUME}/Library/Application Support/Faronics/Private/StorageSpace"
echo "Uninstall StorageSpace complete."
fi
echo "Uninstalling Cloud Agent from \"${MCAVOLUME}\"."
launchctl bootout system "${MCAVOLUME}/Library/LaunchDaemons/com.faronics.cloudagentd.plist"
rm -rf "${MCAVOLUME}/Library/LaunchDaemons/com.faronics.cloudagentd.plist"
rm -rf "${MCAVOLUME}/Library/PrivilegedHelperTools/com.faronics.cloudagentd"
rm -rf "${MCAVOLUME}/Library/Application Support/Faronics/Private/StorageSpace/CloudAgent"
pkgutil --forget "com.faronics.apfs.pkg.cloudagent" --volume "${MCAVOLUME}"
rm -rf "${MCAVOLUME}/Library/Preferences/com.faronics.cloudagentd.plist"
echo "Uninstall Cloud Agent complete."
else
echo "Could not find volume \"${MCAVOLUME}\"."
fi