Skip to main content

 

Druva Documentation

How to perform a silent uninstall of inSync Client from a Mac device

This article applies to:

  • OS: Mac
  • Product edition: inSync Client  

Overview

inSync administrator may want to remove inSync agent completely from the user devices without user input. Uninstalling inSync from a Mac device may be pushed from any deployment tool. However, Mac devices prompt users to retain configuration  before removing the agent. The following script removes inSync from the Mac devices and can be pushed from any deployment tool

Uninstall inSync Client

#!/bin/bash
set +x
user=`ls -l /dev/console | awk '//{print $3}'`
U='/tmp/inSync_client_uninstallation.log'
echo "loggedInUser:" $user  >> $U 2>&1

echo "Stopping inSync Client." >> $U

killall inSync
killall inSyncDecommission

echo "Cleaning up inSync Application from the machine" >> $U

launchctl unload /Library/LaunchDaemons/inSyncDecommission.plist
rm -f /Library/LaunchDaemons/inSyncDecommission.plist

sleep 3

launchctl unload /Library/LaunchAgents/inSyncAgent.plist
rm -f /Library/LaunchAgents/inSyncAgent.plist

sleep 3

echo "Cleaning up Keychain entries" >>$U

/Applications/Druva\ inSync/inSync.app/Contents/MacOS/inSyncDecommission RemoveKeychainItems

sleep 5

echo "Cleaning up package" >>$U

mv /Applications/Druva\ inSync /Applications/Druva\ inSync_old

sleep 5

echo "Cleaning up local Directories" >>$U

mv /Users/$user/Library/Application\ Support/inSync /Users/$user/Library/Application\ Support/inSync_old

exit