Is there a way to create a script to clear cache for an app?
Currently I am using: wipeapplication com.samsara.driver
I would like to clear cache without deleting all data.
Is there a way to create a script to clear cache for an app?
Currently I am using: wipeapplication com.samsara.driver
I would like to clear cache without deleting all data.

It looks like this was just added as a feature to the most recent Android Enterprise Agent.
As far as I know, there is no such script.
In fact, just like for Chrome and other popular browsers, if such a function is really needed, it is the app itself that should include GUI/api for the end-user to clear the cache data owned/created by the app, not any MDM solution nor the device platform owner Google.
Hi Mitchell,
Thank you for posting on SOTI Pulse!
I see that you have marked Raymond's answer as solution. Thank you so much for that! If you require any more assistance, please feel free to let us know.
Kind regards,
Technical Support Specialist | SOTI | +1 905.624.9828 | SOTI.net l Discussion Forum | Log a Case Online l Facebook l LinkedIn l Twitter
Lucky you !!
Can get your required script command newly supported in the latest device agent released just a few days after you posted your question. Really don't know if this is just a coincidence!
Hi Mitchell,
Sending the script will clear cache memory for applications in the device per the package name mentioned in the script:
clearappcache <package name>
Available on 15.7.0 and 15.3.3 Android Agent
Kind regards,
Technical Support Specialist | SOTI | +1 905.624.9828 | SOTI.net l Discussion Forum | Log a Case Online l Facebook l LinkedIn l Twitter