This article applies to:
OS: Windows, Linux (RHEL/CentOS Desktop and Ubuntu Desktop)
Product edition: All versions of inSync Client
Overview
The article provides the scripts that can perform clean uninstallation of the inSync Client from devices running on Windows, Linux RHEL/CentOS Desktop, and Ubuntu Desktop.
π‘ Tip
Copy the scripts in a notepad and save the file as .bat or .cmd.
Script to uninstall from Windows devices
@echo off
set logFile="C:\inSyncCleanup.log"
echo Starting Cleanup... >> %logFile% 2>&1
echo Stopping inSync Service... >> %logFile% 2>&1
net stop inSyncCPHService >> %logFile% 2>&1
timeout /t 2
echo Killing inSync processes... >> %logFile% 2>&1
taskkill.exe /f /im inSync.exe >> %logFile% 2>&1
taskkill.exe /f /im inSyncAgent.exe >> %logFile% 2>&1
echo Uninstalling inSync application... >> %logFile% 2>&1
wmic product where "name like '%%Druva inSync%%'" call uninstall /nointeractive >> %logFile% 2>&1
timeout /t 2
echo Clearing related folders and registry keys... >> %logFile% 2>&1
reg query "HKLM\SOFTWARE\Druva Software" >> %logFile% 2>&1
if %errorlevel% == 0 (
reg delete "HKLM\SOFTWARE\Druva Software" /f >> %logFile% 2>&1
)
rmdir /s /q "C:\inSync4" >> %logFile% 2>&1
rmdir /s /q "C:\ProgramData\Druva" >> %logFile% 2>&1
rmdir /s /q "C:\Program Files\Druva" >> %logFile% 2>&1
echo Cleanup Complete. >> %logFile% 2>&1
Using PowerShell to run uninstall script on a Windows devices
Steps to run the command using PowerShell.
Copy the script in a notepad and save it as .bat or .cmd
Open PowerShell with Admin.
Navigate to the location where the .bat/.cmd file is present (eg: cd C:\Users\username\Desktop)
type .<name of the file> and enter.
The script will run and insync will be uninstalled.
Run uninstall script on a MAC devices
How to save shell script on a Mac with VI editor
Open Terminal
On your Mac, do one of the following:
Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
In the Finder ,open the /Applications/Utilities folder, then double-click Terminal.
π Note
β
$ vi uninstall.sh <Copy and paste the uninstall script> wq!
The uninstall script will be saved with the name ' uninstall.sh '
How to run the shell script
π Note
β
$ chmod 755 uninstall.sh $ sudo bash uninstall.sh
Uninstall inSync Client v6.5.0 and later
π Note
β#!/bin/bash# This script is the uninstall script for Druva InSync###################### Start of Script ####################set +x
βuser=`ls -l /dev/console | awk '//{print $3}'`
echo "loggedInUser" $user echo " Stopping inSync Client." killall inSync
βkillall inSyncDecommission
killall inSyncClientecho " Removing System Files" if [ -e /Library/Application\ Support/inSync ]; then
βecho "System Application Support found and removed"
rm -rf /Library/Application\ Support/inSync
else
echo "System Application Support not found"
fiif [ -e /Library/LaunchDaemons/inSyncDecommission.plist ]; then
βecho "System Launch Daemon found and removed"
/bin/launchctl unload /Library/LaunchDaemons/inSyncDecommission.plist
rm -f /Library/LaunchDaemons/inSyncDecommission.plist
else
echo "System LaunchDaemon not found"
fisleep 3if [ -e /Library/LaunchAgents/inSyncAgent.plist ]; then
βecho "System Launch Agent found and removed"
/bin/launchctl unload /Library/LaunchAgents/inSyncAgent.plist
rm -f /Library/LaunchAgents/inSyncAgent.plist
else
echo "System Launch Agent not found"
fisleep 5echo " Removing InSync App"if [ -e /Applications/Druva\ inSync.app ]; then
βecho "InSync App found and removed"
rm -rf /Applications/Druva\ inSync.app
else
echo "InSync App not found"
fiecho "Removing Keychain entries" /Applications/Druva\ inSync/inSync.app/Contents/MacOS/inSyncDecommission RemoveKeychainItems
βif [ -e /Applications/Druva\ inSync ]; then
echo "Druva Folder App found and removed"
rm -rf "/Applications/Druva inSync"
else
echo "Druva Folder App not found"
fisleep 5echo " Removing User Directories" if [ -e /Users/$user/Library/Application\ Support/inSync ]; then
βecho "User Application Support found and removed"
rm -rf /Users/$user/Library/Application\ Support/inSync
else
echo "User Application Support not found"
fiif [ -e /Users/$user/Library/Preferences/com.trolltech.plist ]; then
βecho "User Preferences found and removed"
rm -rf /Users/$user/Library/Preferences/com.trolltech.plist
else
echo "User Preferences not found"
fiif [ -e /Users/$user/Library/Preferences/com.trolltech.plist.lockfile ]; then
βecho "User Preferences trolltech found and removed"
rm -rf /Users/$user/Library/Preferences/com.trolltech.plist.lockfile
else
echo "User Preferences trolltech not found"
fiif [ -e /Users/$user/Library/LaunchAgents/com.druva.inSyncUpdate.plist ]; then
βecho "User Preferences inSyncUpdate found and removed"
rm -rf /Users/$user/Library/LaunchAgents/com.druva.inSyncUpdate.plist
else
echo "User Preferences inSyncUpdate not found"
fiif [ -e /Users/$user/Library/LaunchAgents/com.druva.inSyncUpdateAgent.plist ]; then
βecho "User Launch Agent found and removed"
rm -rf /Users/$user/Library/LaunchAgents/com.druva.inSyncUpdateAgent.plist
else
echo "User Launch Agent not found"
fiif [ -e /Users/$user/Library/Containers/com.druva.insync.FinderPlugin/** ]; then
βecho "User Containers found and removed"
rm -rf /Users/$user/Library/Containers/com.druva.insync.FinderPlugin/**
else
echo "User Containers not found"
fiif [ -e /Users/$user/Library/Group\ Containers/com.druva.insync.sharedDefaults/** ]; then
βecho "User Group Containers found and removed"
rm -rf /Users/$user/Library/Group\ Containers/com.druva.insync.sharedDefaults/**
else
echo "User Group Containers not found"
fiecho " Removing pkgutil for Druva"pkgutil --forget com.druva.inSync.pkgexit
Uninstall inSync Client v6.2.0 and earlier
π Note
β
#!/bin/bashset +xuser=`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 inSynckillall inSyncDecommission
echo "Cleaning up inSync Application from the machine" >> $U
launchctl unload /Library/LaunchDaemons/inSyncDecommission.plistrm -f /Library/LaunchDaemons/inSyncDecommission.plist
sleep 3
launchctl unload /Library/LaunchAgents/inSyncAgent.plistrm -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
Additional references
Script to uninstall from RHEL/CentOS devices
#!/bin/bash # # This is a inSync uninstallation script! # Please consult Druva Tech Support before use it. # ## Start running script echo "Running script..." RPM=$(rpm -qa |grep -i druva-insync-client) echo $RPM if [[ -z $RPM ]] then echo "No Druva inSync Packages found on host, exit..." echo exit else echo found Druva packages: $RPM echo echo Uninstalling: $RPM echo rpm -e $RPM fi # Following lines are for deleting remaining inSync files and directories sleep 5 echo echo "Deleting remaining inSync files and directories... "rm -rf /home/*/.inSync rm -rf /opt/Druvaecho echo "Completed uninstall Druva inSync Packages on host" echo
Script to uninstall from Ubuntu devices
#!/bin/bash # # This is a inSync uninstallation script! # Please consult Druva Tech Support before use it. # # # Start running script echo "Running script..." PKG=$(dpkg -la |grep -i druva-insync-client) echo $PKG if [[ -z $PKG ]] then echo "No Druva inSync Packages found on host, exit..." echo exit else echo found Druva packages: $PKG echo echo Uninstalling: $PKG echo dpkg -r $PKG dpkg --purge $PKG echo fi # Following lines are for deleting remaining inSync files and directories sleep 5 echo echo "Deleting remaining inSync files and directories... " rm -rf /home/*/.inSync rm -rf /opt/Druva echo echo "Completed uninstall Druva inSync Packages on host" echo