1. Home
  2. Knowledge Base
  3. SureMDM
  4. How to Remove SureMDM, SureLock, SureFox, and SureVideo Logs from Android Devices by Run Script Job

How to Remove SureMDM, SureLock, SureFox, and SureVideo Logs from Android Devices by Run Script Job

SureMDM is an intuitive and powerful mobile device management solution that enables businesses to remotely manage, monitor, and secure Android devices. SureFox, SureLock, SureVideo, and SureMDM Agent are individual components of the SureMDM suite, each serving specific purposes. When troubleshooting issues with these components, collecting relevant logs and settings can significantly assist in diagnosing and resolving problems efficiently.

Log files are auto-generated files whenever an event with a specific classification takes place on the device. However, sometimes the client doesn’t want to keep all the logs since they can accumulate a large amount of storage. Hence, emptying the log file removes the data in the file, which can help preserve disk space.

SureMDM now offers the option of deleting all logs from the device by using Runscript. Users don’t need to remote in and delete one log file at a time, which in turn smooths the user experience.


The purpose of this knowledge article is to provide a guide on how to delete or remove all logs (SureMDM, SureLock, Surefox, and SureVideo) from Android devices using the Run Script.


  • Deleting log files on your mobile device can have different consequences depending on the type of log files you delete. Therefore, it is not recommended to delete all the logs, as the latest ones might require troubleshooting in case any issue is experienced.


1. Log into SureMDM console and navigate to Jobs.

2. Click New Job and select the OS as Android. Further, click Run Script Job.

3. In the Run Script window, enter the job name and type the below script in the script box.

The below run scripts are used to delete logs as per the user case or requirement:

For SureMDM,

rm -r //storage/emulated/0/Documents/42Gears/SureMDM*/Logs/SureMDM*_LOG.*

For SureLock,

rm -r /sdcard/Documents/42Gears/SureLock/Logs/*

For SureFox,

rm -r /sdcard/Documents/SureFox/Logs/*

For SureVideo,

rm -r /sdcard/Documents/SureVideo/Logs/*

4. Once done, click on Save.

The newly created job will be listed in the Jobs List.

5. Go back to the Home tab and select the Android device(s) or group(s).

6. Click Apply to launch the Apply Job/Profile To Device prompt.

7.  In the Apply Job/Profile To Device prompt, select the job and click Apply.

Need help? 


Was this helpful?
Updated on March 2024