Java tutorial
//package com.java2s; import java.io.File; import android.content.Context; public class Main { public static void clearCache(Context context) { File cache = context.getCacheDir(); String[] files = cache.list(); for (String file : files) { File data = new File(cache.getPath() + "/" + file); data.delete(); } } }