Skip to main content
Druva Documentation

Scripts for clean uninstallation of inSync Client

 

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

Copy the scripts in a notepad and save the file as .bat or .cmd.

Script to uninstall from Windows devices


@echo off

findstr /s /c:"KEY = ''" C:\inSync4\*.cfg > "C:\inSyncCleanup.log"  2>&1
if %ERRORLEVEL% == 0 (
GOTO DO_Cleanup
)

findstr /s /c:"KEY = ''" C:\ProgramData\Druva\inSync4\*.cfg >> "C:\inSyncCleanup.log"  2>&1
if %ERRORLEVEL% == 0 (
GOTO DO_Cleanup
)

GOTO END

:DO_Cleanup

net stop inSyncCPHService   >> "C:\inSyncCleanup.log"  2>&1
Echo Stopping inSync Service

timeout -t 2
taskkill.exe /f /im inSync.exe >> "C:\inSyncCleanup.log" 2>&1       
TASKKILL.exe /f /im inSyncAgent.exe >> "C:\inSyncCleanup.log" 2>&1

Echo inSync related processes are stopped...

echo Please wait while inSync application is getting uninstalled..

wmic product where "name like '%%Druva inSync%%'" call uninstall /nointeractive >> "C:\inSyncCleanup.log"  2>&1

timeout -t 2

echo clearing related folders...

reg query "HKLM\SOFTWARE\Wow6432Node\Druva Software" >> "C:\inSyncCleanup.log" 2>&1
if %errorlevel% == 0  reg delete "HKLM\SOFTWARE\Wow6432Node\Druva Software" /f >> "C:\inSyncCleanup.log"  2>&1

reg query "HKLM\SOFTWARE\Druva Software" >> "C:\inSyncSynclog_issue.log"  2>&1
if %errorlevel% == 0  reg delete "HKLM\SOFTWARE\Druva Software" /f >> "C:\inSyncSynclog_issue.log"  2>&1


rmdir /s /q "C:\inSync4" >> "C:\inSyncCleanup.log" 2>&1
rmdir /s /q "C:\ProgramData\Druva" >> "C:\inSyncCleanup.log"  2>&1
rmdir /s /q "C:\Program Files(x86)\Druva"  >> "C:\inSyncCleanup.log"  2>&1

:END

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/Druva

echo
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