I am using IPackageDataObserver.class for removing cache, it is working till android 5.1.1 but not for android 6.0.1. and above. As it is deprecated for the above versions and gives security exception and Method.Invocation exception. Now I have seen apps that are clearing cache for android 6.0.1 and above like clean master. May be they are using accessibility and I don't know much about accessibility. So can anyone help me with this or suggest some other way for removing the cache memory.