Temporary files are an integral part of the operation of any Android device. The cache speeds up application loading, saves traffic and improves performance, but over time it takes up gigabytes of precious space. Where exactly is this cache stored? Can it be transferred to an SD card or the cloud? And what will happen if you just delete all temporary files?
This article will help you understand the intricacies of cache management on Android: from standard storage paths to non-obvious tricks for gamers and users with limited memory. We will look at official methods and workarounds that are relevant for modern versions of the operating system, and also tell you how to avoid common mistakes when working with temporary data.
Where the cache is stored by default on Android
The Android operating system distributes the cache across several standard directories, access to which depends on the OS version and application permissions. The main paths for storing temporary files:
- ๐ Internal memory of the device โ
/data/data/<package_name>/cache/(root access is required to view) - ๐ General application cache โ
/data/cache/(system folder) - ๐ Dalvik/ART cache โ
/data/dalvik-cache/(launch optimization applications) - ๐ External cache โ
/sdcard/Android/data/<package_name>/cache/(available without root)
Starting with Android 11, Google has tightened the rules for working with external drives, so many applications can no longer store cache on SD card without the user's explicit permission. The exception is games and apps that use Adoptable Storage (the function of formatting a memory card as internal storage).
It is important to understand that the system cache (/cache) and application cache are different things. The first is responsible for system updates and recovery from failures, and the second contains temporary data of specific apps (images, videos, configuration files).
How to check how much space the cache takes up
Before deciding to move or clear the cache, it is worth assessing the real situation with the occupied space. You can do this in several ways:
- ๐ Built-in Android settings:
Go to
Settings โ Storage โ Cache data. The total size of temporary files of all applications is displayed here. On some firmware (for example MIUI or ColorOS) the path may differ:Settings โ Applications โ Manage applications โ Filter by size. - ๐ Analysis through the file manager:
Use Solid Explorer, FX File Manager or standard explorer to manually check folders
/Android/data/and/Android/obb/. Games and social networks often store gigabytes of media files here. - ๐ฑ Third-party utilities:
Applications like SD Maid or CCleaner scan the system for junk files, including residual cache after uninstalling apps. They also show which apps are taking up the most space.
| Verification method | Accuracy | Root required? | Sample data |
|---|---|---|---|
| Android Settings | Medium | No | Shows only the total cache size |
| File manager | High | For system folders - yes | Application-specific cache folders |
| SD Maid | High | None (but more data from root) | Cache, residual files, duplicates |
| ADB commands | Maximum | No (but skills are required) | Full list of cached packages |
Please note: some applications (for example Google Chrome or YouTube) may show an inflated cache size due to the peculiarities of calculating occupied space. In such cases, it is useful to compare the data from the settings and the file manager.
If you need to free up space urgently, start by clearing the cache of instant messengers (Telegram, WhatsApp) and social networks - they often store gigabytes of unnecessary media files.
Is it possible to transfer the cache to an SD card or flash drive
The issue of transferring the cache to an external drive worries many users, especially owners of smartphones with 16โ32 GB of internal memory. Technically this is possible, but with serious caveats:
- โ For individual applications: Some games (for example, Genshin Impact or Call of Duty Mobile) allow you to manually select the path for downloading additional files. Look for the corresponding option in the game settings.
- โ ๏ธ Via Adoptable Storage: The function of formatting an SD card as internal memory (available up to Android 9) allows you to deceive the system, but has risks: the card will be encrypted and will not be readable on other devices.
- โ For the system cache: Transferring folders from
/data/data/to SD is impossible without root access and can lead to application crashes. - โ๏ธ Cloud solutions: Services like Google Files or Dropbox can automatically clear the cache, keeping backup copies of important data in the cloud.
Starting with Android 10Google has blocked direct access of applications to the root of the SD card for reasons security. Now apps can only work with their own folder on the external drive (/Android/data/<package_name>/). This means that:
โ ๏ธ Attention: If you are using the SD card as portable storage (not Adoptable Storage), applications will not be able to save cache to it without explicitly asking permission. Many games will simply refuse to launch if the required files do not fit into the internal memory.
To bypass restrictions, some users resort to:
- ๐ง Symlink (symbolic links): Creating โshortcutsโ from internal memory to SD (requires root and knowledge of commands
ln). - ๐ฆ App2SD applications: Utilities like Link2SD or FolderMount (do not work on all firmware).
- ๐ฎ Modified APK: Some games have patched versions with support for external storage (risk of bans!).
How to create a symbolic link for the cache?
1. Get root access and install Terminal Emulator.
2. Enter the command:
suln -s /sdcard/Android/obb/com.game.package /data/data/com.game.package/obb
3. Reboot the device.
โ ๏ธ An error in the path or permissions will crash the application!
Clearing the cache: when is it necessary and how to do it correctly
Clearing the cache regularly helps free up space, but is not always useful for performance. Let's take a look at in which cases it is really needed:
| Situation | Do you need to clear the cache? | Risks |
|---|---|---|
| Run out of space on the internal drive | Yes, first of all | Applications will take longer to load |
| The application began to slow down or crash | Yes, but only for this application | Loss of temporary data (for example, offline maps) |
| "Just like that", for prevention | No, it's pointless | The load on the battery and processor will increase |
| After updating Android | Yes, for system applications | Some settings may be reset |
How to clear the cache safely:
Estimate the free space in the storage settings|Clear the cache of specific applications through "Settings โ Applications"|Use a file manager to delete the /Android/data/*/cache folders|Reboot the device after cleaning|Check the operation of critical applications (banking, instant messengers)-->
To deep clean the system cache (for example, after an update), you can use the mode Recovery:
- Turn off the device.
- Hold down the button combination to enter Recovery (usually
Power + Volume Up). - Select
Wipe cache partition(not to be confused withWipe data/factory reset!). - Reboot your smartphone.
โ ๏ธ Attention: Clearing the cache Google Play Services or Google Play Market may lead to problems with authorization in your Google account. After such an operation, be sure to check the operation of Google services and, if necessary, re-login to your account.
Features of working with the cache in games
Mobile games are the main cache eaters. Projects like PUBG Mobile, Free Fire or Genshin Impactcan take up to 10-15 GB for additional textures, sounds and levels. Let's look at the nuances:
- ๐ฎ OBB files: This is not a cache in the usual sense, but basic game data. They are stored in
/Android/obb/and are usually not cleared automatically. Removing OBB will require you to download them again. - ๐ผ๏ธ Texture packs: Games with highly detailed graphics (for example, Call of Duty Mobileallow you to choose the quality of textures. Low settings will save space, but will worsen the visuals.
- โ๏ธ Cloud cache: Some games (for example, Fortnite Mobile) support on-demand texture streaming, reducing local storage.
- ๐ Auto-cleaning: In the settings of many games there is an option "Clear cache" or "Delete unnecessary files" - use it before manual cleaning.
Critical information for gamers: if the game requires a mandatory update, but cannot download files due to lack of space, try manually deleting the folder with the cache of this game from /Android/data/<package_name>/cache/ and restart it. This often helps to bypass loading errors.
For multiplayer games (MOBA, shooters), clearing the cache can lead to:
- โณ Longer loading of matches (re-loading textures).
- ๐ Loss of offline data (for example, saved repetitions in Mobile Legends).
- ๐ซ Temporary account blocking (if the game suspects cheating due to file mismatches).
Never delete files from the /Android/obb/ folder manually unless you plan to reinstall the game. This will lead to loading errors and may damage your account.
Automation of cache management
Manually clearing the cache takes time, so many users prefer to automate the process. Let's consider the available tools:
- ๐ค Built-in Android tools:
Starting with Android 8.0 Oreo, the system automatically clears the cache of applications that have not been used for a long time. This mechanism is called Automatic Storage Management and works in the background.
- ๐ Google Files (Files by Google):
The application offers a "Cleanup" function (
Clean), which deletes unnecessary files, including cache, duplicates and large media. - โ๏ธ Tasker/Automate:
Advanced users can create automatic tasks to clear the cache on a schedule or under certain conditions (for example, when free space is less than 500 MB).
- โ๏ธ Cloud services:
Google One or Dropbox offer backup and cache clearing functions with synchronization of important data.
For automation via ADB (without root) you can use the command:
adb shell pm trim-caches <com.package.name>
This command will clear the cache of the specified application without deleting user data.
โ ๏ธ Attention: Automatic clearing of the messenger cache (for example, Telegram) can lead to the loss of unsaved media files. Set up exceptions for critical applications in utilities like SD Maid.
If you use Magisk or other tools to obtain root access, consider modules like Universal Storage Switch, which allow you to flexibly manage cache storage paths. However, remember that such manipulations can:
- ๐ซ Disrupt the operation of Google Pay and banking applications (due to SafetyNet).
- ๐ Lead to cyclic reboots in case of errors. mount.
- ๐ Worse performance due to a slow SD card.
What to do if the cache is not cleared
Sometimes users are faced with a situation where the cache takes up gigabytes, but is not deleted using standard methods:
| Problem | Possible cause | Solution |
|---|---|---|
| Cache takes 0 bytes, but space is not freed | Counting error in Android settings | Use a file manager for manual checking |
| The application immediately restores the cache after clearing | Automatic loading of data (for example, in Spotify) | Disable background synchronization in the application settings |
| Cannot clear the system cache applications | Manufacturer restrictions (for example, on Xiaomi or Huawei) | Use ADB: adb shell pm clear <package_name> |
| The cache folder is empty, but the space is occupied | The cache is stored in a non-standard location (for example, /data/app-lib/) |
Check via DiskUsage or Storage Analyzer |
To diagnose the "invisible" cache, it is useful to use the command:
adb shell du -sh /data/data/*/cache | sort -rh | head -n 10
It will show the top 10 applications by cache volume (ADB connection and superuser rights are required).
If standard methods do not help, try:
- ๐ Reinstall the problematic application: This is guaranteed to delete all its data, including the cache.
- ๐ ๏ธ Reset application settings: In the menu
Settings โ Applications โ [Select application] โ Storage โ Reset settings. - ๐ฑ Update firmware: Some custom firmware (for example LineageOS) have bugs with cache calculation.
โ ๏ธ Attention: On devices with Dynamic Partition (starting from Android 10), clearing the cache via Recovery may not give the expected effect due to the peculiarities of the memory layout. In such cases, only resetting to factory settings will help.
FAQ: Frequently asked questions about the cache on Android
Is it possible to transfer the cache WhatsApp to an SD card?
WhatsApp does not support official transfer of the cache to external drives. However, you. you can:
- Manually copy the folder
/Android/media/com.whatsapp/to SD. - Use symbolic links (root required).
- Set up automatic saving of media to the cloud (Google Photos).
Please note: when transferring via a symlink, errors in sending media files may occur.
Why, after clearing the cache, YouTube takes up several gigabytes again?
YouTube caches video for offline viewing in the folder /Android/data/com.google.android.youtube/cache/. To control this:
- Open the application YouTube โ
Settings โ Background game and downloads. - Disable the option "Save videos for offline viewing automatically."
- Manually delete unnecessary ones offline video in the library. Is it safe to clear the cache? data-i="262">Requests to re-enter your password in some services.
Is it safe to clear cache? Google Play Services?
Clearing cache Google Play Services usually harmless, but may lead to:
- Temporary synchronization errors (for example, in Google Fit).
- Requests to re-enter your password in some services.
- Slowdown of geolocation in the first few minutes after cleaning.
If problems arise after cleaning, reboot the device or check for updates in Google Play.
How to clear the cache on Android without access to settings (for example, on a locked device) phone)?summary>
If the device is locked, but you have access to the computer, try:
- Connect your smartphone via USB in mode
MTP.
- Use ADB to clear the cache of specific applications:
adb shell pm clear --user 0 <package_name>
- For complete wipe (requires unlocked bootloader):
fastboot erase cache
โ ๏ธ These methods will not work if data encryption is enabled on the device.
MTP.adb shell pm clear --user 0 <package_name>
fastboot erase cache
Is it true that clearing the cache speeds up the phone?
It depends on the situation:
- โ Helps if: The cache is fragmented or takes up a critically large amount of space (more than 5-10% of the total memory).
- โ Does not help if: Cleaning is carried out โfor preventionโ on a device with sufficient free space.
- โ ๏ธ Can cause harm: After clearing the cache of frequently used applications (for example, Chrome or Instagram), they will take longer to load and consume more traffic.
For real speedup, it is better to optimize background processes through Settings โ Developer โ Background process limit.