I am releasing a new update, that will change my app build completely from the last version. I want the the app to be fresh and delete all old unceccery cache and data for current users. How can I achieve this? what the right code to use, and where to add it exactly, I am not expert in android development, so please guide me more specifically. I checked this question, but there's no mention of what code actually works to clear data and cache.
My setup (incase needed):
// Android Studio 3.0
compileSdkVersion 26
buildToolsVersion '27.0.3' (Gradle)
minSdkVersion 16
targetSdkVersion 26