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.
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?
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
- Go to Settings β About Phone β Memory β Cleanup.
- Select the category βCash Appsβ and click βClearβ.
- In the Files to Download section, delete unnecessary APKs and media files.
- 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:
- Install ADB Tools on your PC.
- Turn on Settings β About Phone β MIUI version (click 7 times to activate developer mode).
- Go to Settings β Additional β For developers and enable debugging over USB.
- 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 file | Way | Size (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:
- Install Magisk to get root (XDA Developers has instructions for Xiaomi).
- Use Root Explorer or FX File Manager to navigate /data/.
- 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:
- Delete the active app folders in /Android/data/. For example, deleting com.facebook.katana will erase all Facebook data, including saved passwords.
- Clear /data/data/ without backup, which will delete all accounts, messages and settings.
- Using ADB commands without understanding, for example, an adb shell rm -rf /system/ will remove the firmware and render the phone inoperable.
- 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.