Where Xiaomi Phone Stores Temporary Files and How to Delete Them Safely

Why Temporary Files Take Up Memory and Where to Look for Them

The temporary files in Xiaomi smartphones are invisible β€œjunk” data that accumulates when apps run, system updates and even simple surfing the Internet. They can take up from 500 MB to 5-10 GB of memory, slowing down the device and reducing the life of the drive. Unlike other brands’ Android smartphones, MIUI (the Xiaomi brand shell) stores temporary files in several hidden folders, and manually cleaning them requires knowing the exact paths.

The main sources of temporary files:

  • πŸ“± Application cache – residual data after updates or using programs (for example, YouTube, TikTok, Telegram).
  • πŸ”„ Log files of the system - error logs and debugging information that MIUI diagnostics.
  • ⬇️ Download files - undeleted APK, Images from messengers, temporary copies of documents.
  • πŸ—‘οΈ System garbage – residues after uninstallation of programs, duplicate media files.

The problem is that the standard MIUI Cleaner only removes some of the debris, for example, it doesn’t touch /data/log/, a folder with logs that can weigh up to 1-2 GB on active devices. In this article, we’ll take a look at all possible locations of temporary files, including hidden system directories, and show you how to safely remove them without risking damage to MIUI.

πŸ“Š How often do you clean temporary files on Xiaomi?
Once a week.
Once a month
Only when memory ends
Never cleaned.

Where to store temporary files in Xiaomi: a full list of folders

Temporary files in Xiaomi are scattered across several memory areas: internal storage (/storage/emulated/0/), system partition (/data/), and application cache. Below are the current paths for MIUI 12-15 (including Redmi, POCO, and Black Shark).

Main locations:

  • πŸ“ /storage/emulated/0/Android/data/ β€” cache of user applications (for example, games, social networks).
  • πŸ“ /storage/emulated/0/Download/ β€” downloads from browsers and instant messengers (often containing duplicates).
  • πŸ“ /data/log/ β€” System Logs (root rights required to access).
  • πŸ“ /storage/emulated/0/DCIM/.thumbnails/ β€” Photo and video miniatures (can weigh up to a maximum of two) 500 MB).
  • πŸ“ /storage/emulated/0/Android/obb/ β€” Temporary game files (e.g. Genshin Impact, PUBG Mobile).

Some folders (e.g. /data/) will require superuser permission or ADB. If you don’t have root, focus on cleaning /storage/emulated/0/β€”up to 70% of the temporary data is stored here.

How to check the size of temporary files without root?
Open Settings β†’ About Phone β†’ Memory. System Memory or Other Files shows the amount of cache and debris. Click on the category to see the details.

How to clean temporary files manually (without root)

If you don’t want to use third-party cleaners (like CCleaner or SD Maid), temporary files can be deleted through built-in MIUI tools or file manager.

Method 1: Through the Cleaner in MIUI

  1. Go to Settings β†’ About Phone β†’ Memory β†’ Cleanup.
  2. Select the category β€œCash Apps” and click β€œClear”.
  3. In the Files to Download section, delete unnecessary APKs and media files.
  4. Check the tab "Duplicates of files" - here often accumulate copies of photos from messengers.

Method 2: Through the File Manager

Use the standard Files by Google or Mi File Manager:

Open /storage/emulated/0/Download/ and delete unnecessary files |

Go to /storage/emulated/0/DCIM/.thumbnails/ and clean the thumbnails |

Check it out. /storage/emulated/0/Android/data/ β€” Delete the folders of remote applications (for example, com.tencent.mm for WeChat, if you uninstall it)|

Clear /storage/emulated/0/Android/obb/ of old game files (if games are deleted)

-->

Attention! Do not delete active app folders in /Android/data/, which will cause malfunctions in their work, for example, deleting com.whatsapp will erase all WhatsApp chats.

πŸ’‘

If the Download folder has a lot of files with the extension.apk,.tmp or.crdownload, they can be safely deleted - these are under-quality or temporary files.

How to delete temporary files with ADB (without root)

If standard methods don’t work, you can use Android Debug Bridge (ADB), a tool to control your smartphone through your computer, which does not require root, but allows you to clear the system cache and logs.

Step-by-step:

  1. Install ADB Tools on your PC.
  2. Turn on Settings β†’ About Phone β†’ MIUI version (click 7 times to activate developer mode).
  3. Go to Settings β†’ Additional β†’ For developers and enable debugging over USB.
  4. Connect your phone to your PC and execute in the command line: adb shell pm clear com.miui.cleanmaster # Reset the MIUI adb shell rm -rf /data/local/tmp/* # Delete temporary update files adb shell rm -rf /cache/* # Clear the system cache

These commands are safely removed:

  • πŸ—‘οΈ Cash updates. MIUI (folder /data/local/tmp/).
  • πŸ”„ System cache (/cache/), which is not visible through the file manager.
  • πŸ“± Residual data of a standard cleaner (Clean Master).

⚠️ Note: Do not use the command adb shell rm -rf /data/* β€” This will completely erase user data and lead to a reset of the phone!

Hidden temporary files: logs, dumps and system debris

The heaviest temporary files in Xiaomi are hidden from the user and stored in system partitions, which can only be deleted with root access or through TWRP (Castom Recovery), and below is a list of such files and their locations:

Type of fileWaySize (example)Can I remove it without root?
Log files of the system/data/log/500MB - 2GB❌ No.
Memory dumps (for crashes)/data/tombstones/10–500 MB❌ No.
Cash of MIUI updates/data/ota_package/1-3 GBβœ… Yes. ADB)
Temporary Google Play files/data/app-lib/200-800 MB❌ No.

To delete these files:

  1. Install Magisk to get root (XDA Developers has instructions for Xiaomi).
  2. Use Root Explorer or FX File Manager to navigate /data/.
  3. Remove the contents of the folders from the table above, except for: 🚫 /data/data/ β€” This is where the application data is stored (deleting will result in loss of accounts). 🚫 /data/system/ β€” system settings MIUI.

⚠️ Note: Delete files in /data/ without backup can cause data loss or a cyclical reboot of the phone. TWRP Mi Cloud.

How to Prevent Temporary Files from Accumulating in the Future

To prevent temporary files from clogging Xiaomi memory, follow these guidelines:

  • πŸ”„ Turn off automatic app updates on Google Play (or limit it to Wi-Fi only).
  • πŸ“± Use the "Light Mode" in MIUI (Settings β†’ Special opportunities β†’ Easy mode – it reduces the creation of dens.
  • πŸ—‘οΈ Set up automatic cleaning in Settings β†’ The phone. β†’ Memory. β†’ Autocleaning.
  • πŸ”’ Limit the background activity of applications through Settings β†’ Annexes β†’ Permits β†’ Auto-start.

It is also useful to check folders regularly:

  • πŸ“ /Download/ β€” remove APK post-installation.
  • πŸ“ /DCIM/.thumbnails/ β€” Clean your miniatures once a month.
  • πŸ“ /Android/data/ β€” delete folders of remote applications.

πŸ’‘

Even if you don’t manually clean temporary files, set up automatic cleanup in MIUI to prevent critical memory filling.

Frequent errors in cleaning temporary files

Many Xiaomi users make mistakes that cause system failures or data loss, and here are the most common:

  1. Delete the active app folders in /Android/data/. For example, deleting com.facebook.katana will erase all Facebook data, including saved passwords.
  2. Clear /data/data/ without backup, which will delete all accounts, messages and settings.
  3. Using ADB commands without understanding, for example, an adb shell rm -rf /system/ will remove the firmware and render the phone inoperable.
  4. Deleting files from /storage/emulated/0/Android/obb/ for active games can result in crashes or loss of progress.

If after cleaning the phone began to slow down, restart or give out errors, try:

  • πŸ”„ Reset the device.
  • πŸ› οΈ Reset settings through Settings β†’ System system β†’ Resetting settings (without deleting data).
  • πŸ“± Reinstall the problem application.

πŸ’‘

If photos or contacts are missing after cleaning, check the /storage/emulated/0/MIUI/Backup/ folder - there may be backups there.

FAQ: Answers to Frequent Questions

Can I delete temporary files via PC?
Yes, connect the phone to the computer in file transfer mode (MTP) and manually clean the folders. /Download/, /DCIM/.thumbnails/ and /Android/obb/. To access system folders (/data/) need ADB root.
Why does the memory re-fill after cleaning?
It's because of this: πŸ“± Background activity of applications (for example, Facebook, TikTok constantly create cache). πŸ”„ Automatic updates MIUI applications. πŸ—‘οΈ Log files that the system creates every time it turns on/off. Solution: Turn off auto updates and limit background activity in battery settings.
How to Clear the Google Play Services Cache?
Go to Settings β†’ Applications β†’ App Management β†’ Google Play Services β†’ Memory β†’ Clear cache. If the button is inactive, use ADB: adb shell pm clear com.google.android.gms Attention! This may temporarily disrupt Google services (e.g. YouTube or Gmail).
What to do if /data/log/ is 5GB?
This is normal for Xiaomi with active use. To clean it up: Get root access (via Magisk). Use Root Explorer to delete the contents of /data/log/. Reboot your phone. If root doesn't, wait for the next MIUI update to automatically clear some of the logs.
Can I transfer temporary files to SD-map?
Some applications (such as WhatsApp) allow you to save media to SD, but the system cache and logs always remain in internal memory. To transfer the cache of games (such as PUBG), use the option β€œMove to SD” in the application settings.