Clear App Cache - Samsung Tablets

Solved
TW
Tim Wright
tmplant

Hi all, 

 

Lookign through posts I can see this has been asked a lot however, have we ever found a clear cache app script for a samsung tablet, I've got an app that's holding 4GB of data in the cache and needs clearing weekly

22 hours ago
Android Scripting
ANSWERS
BI
Bradley Inglesant
21 hours ago

Hi Tim,

Yes, you can use the legacy script  clearappcache [BundleID].

You can also clear the app data and cache using wipeapplication [BundleID].

If I were you, I'd use a task scheduler profile that runs this every week on the devices automatically.

Here's the legacy script documentation for 2026.1, but in the top-right corner you can also select whichever version the portal you're running is on to ensure it's supported: https://pulse.soti.net/support/soti-MobiControl/help/?V=2026.1&T=scriptcmds/reference/androidplus_enterprise_do

Thanks,

Bradley

RS
Rafael Schäfer
20 hours ago

This is also available as JS (depending on which agent version you are). I made a function out of it:

//0 = cache, 1 = cache & data 
CleanApp('com.android.chrome', 1); 
mobicontrol.agent.checkIn(); 

function CleanApp(BundleID, mode) {
     if (mode == 0) {
         mobicontrol.app.clearCache(BundleID);
     } else if (mode == 1) {
         mobicontrol.app.clearCache(BundleID);
         mobicontrol.app.clearData(BundleID);
     } 
}
Solution