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
: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
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.
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