What is Dalvik Cache and How To Free Space by Clearing Dalvik Cache

One of the common thing we come across on Forums and Blogs related to Android is Dalvik cache. What is it and How it is different and Why it is so important to clear it? Dalvik Cache, is a temporary space used by the Java virtual machine to run Android applications.

Over time the space occupied is rising, and is not recovered. Although, selective System Cleanup is possible but sometimes its worth a full erase.

When this space is cleared completely, reboot the device, and this time takes a while to boot the device. Not to worry, even if the screen is black, it ends up booting. That time is spent regenerating the cache with the applications we have installed. After that we will have got some free space, because over time the Dalvik Cache swells.

How to Clear Dalvik Cache Manually / Command

The first way to clear the Dalvik Cache is done manually. It is fairly easy, if you have installed the Android SDK (or use a terminal emulator on Android) and have some knowledge of Linux commands. Basically you have to do is delete the entire contents of /data/Dalvik-cache.

You only have to run the command rm-r /data/Dalvik-cache/* either from a terminal emulator on the Android itself or through the SDK adb shell tool. Once done you have to reset the device.

Dalvik Cache Cleaner App for Android

There are many applications in Google Play store that allow clearing of Dalvik Cache. I’ve used one such called Andromizer and is quite simple. Simply click on Remove Dalvik Cache, give OK and the terminal will automatically reboot with the regenerated cache.

Dalvik Cache Cleaner App

Titanium Backup also lets you delete the Dalvik Cache, but only to the paid version. Andromizer is therefore a good free lightweight alternative to perform this operation.

Clear Dalvik Cache using Recovery

Another option you have is to delete the Dalvik Cache from the recovery, at least if we need ClockworkMod Recovery. In the advanced menu, there is the option of deleting the Dalvik cache and will not need any special application to do so, simply enter the recovery on restart (how to do this varies from terminal to terminal, but can be done with the command adb reboot recovery )

Clear Dalvik Cache from CWM Recovery

Click Here to Leave a Comment Below 3 comments
Scott - June 8, 2012

It turns out that my apps weren’t deleted after all. But, my phone didn’t behave quite as described here. It booted in normal time and appeared as though all non-system apps had disappeared. However, when I checked my phone again quite a while longer, everything was back. So I guess the cache is now regenerated *after* boot, not during boot.

Reply
    Rohit Langde - June 11, 2012

    That’s true Scott. Regeneration of Dalvik cache takes time and effects are seen after sometime of booting. This is the reason why Developers recommend to keep phone idle for sometime after clearing cache on installing new ROM.

    Reply

Leave a Reply: