How do I clear caches (app, individual apps, Dalvik, ART if possible) via ADB?
Using apps, recovery, or doing it through Settings are not options for me. Also, my phone is not rooted.
How do I clear caches (app, individual apps, Dalvik, ART if possible) via ADB?
Using apps, recovery, or doing it through Settings are not options for me. Also, my phone is not rooted.
ADB is close, but things like adb shell pm clear <package_name>
to clear caches (and data, oops) from selected apps requires root (as would clearing Dalvik cache). But there's a similar approach to just wipe out all app caches (not Dalvik/ART, though): fastboot erase cache
would do that with the device booted into the bootloader. Details can be found e.g. here: Useful ADB and Fastboot Commands and How to Use them.
adb reboot bootloader
and adb reboot fastboot
both appear to just reboot the phone normally. I don't know what they're supposed to do, but it looks like a regular reboot and brings me into the regular UI. And afterwards, fastboot devices
lists nothing, even though adb devices
does. I tried fastboot erase cache
, but it just says < waiting for device >
forever. What exactly do I have to do in order to be able to execute fastboot erase cache
?
fastboot devices
will only report your device in fastboot mode – where adb devices
won't report anything.
If you have root access, Using adb you can clear cache.
rm -r /data/dalvik-cache
rm -r /cache/dalvik-cache
You can use Zero Cleaner app, it's like cleaning the app catches manually, but it's automatized, and requires accessibility permission.