Xiaomi smartphones (including the Redmi and POCO lines) eventually start to slow down due to the accumulation of unnecessary temporary files, which take up precious space in memory, slow down the system and can even cause malfunctions in applications. Unlike the application cache, which is manually cleared, temporary files often go unnoticed โ they are created by both the MIUI system and third-party programs.
Compounding the problem, many users donโt know where to look for this โjunk.โ Regular Settings โ Storage only deletes a fraction of files, and some temporary data (such as Dalvik cache or residual update files) require special techniques. In this article, weโll take a look at all possible sources of temporary files on Xiaomi, including hidden folders and system partitions, and show how to safely delete them without risking damage to the OS.
What are temporary files and why should they be deleted?
Temporary files (or temp files) are data that is created by a system or application for short-term use.
- ๐ Speed up the loading of frequently used items (cache of images, web pages).
- ๐ Save intermediate program results (e.g. unsaved documents).
- ๐ฆ Ensure the correct installation of updates (.apk files, log files).
- ๐ฎ Optimize performance in games (shaders, textures).
However, over time, these files accumulate and turn into digital garbage. MIUI file /cache There can be gigabytes of unnecessary data, and apps like Facebook or TikTok store cache even after they're deleted. 6+ For months of use, temporary files are used 1,5 before 5 GB of memory โ and this does not take into account the cache of user applications!
โ ๏ธ Note: Do not confuse temporary files with app cache. cache can be cleared in each application settings, and temporary files are often hidden in system folders and require manual removal or special utilities.
Consequences of ignoring the problem:
- ๐ข Slowing down the interface MIUI (delays when opening the menu, lags when scrolling).
- ๐ Increased battery consumption (the system spends resources on processing unnecessary data).
- ๐ Application failures (such as sudden closures of Google Play Store or Galery).
- ๐ซ Inability to install updates due to lack of space in the section /cache.
Method 1: Cleaning through the built-in utility "Optimization"
The easiest method is to use the standard Optimization app (formerly Security) that is on all Xiaomi smartphones, which automatically scans the device for unnecessary files, including:
- ๐๏ธ Residual files after uninstallation of applications.
- ๐ Cash miniatures (thumbnails) in the gallery.
- ๐ฅ Unused. APK-Files (remainders after updates).
- ๐ Log files of system and applications.
Cleaning instructions:
- Open the Optimization app** (the shield icon on the desktop or menu).
- Go to the Cleanup tab** (in some versions of MIUI โ โJunkโ).
This method removes up to 70% of temporary files, but leaves system caches (like Dalvik-cache) and some application folders intact.
๐ก
If the same files appear again after cleaning the utility, check the applications that create them. Most often, messengers (Telegram, WhatsApp) and social networks (Instagram, TikTok) are to blame.
Method 2: Manually delete temporary files via file manager
For power users, the best way to manually check key folders where temporary data is being stored is important: some folders are hidden, so first enable the display of hidden files in your file manager (for example, in Mi File Manager or Solid Explorer).
The main folders for cleaning:
| folder | Way | What can be removed | Risk to the system |
|---|---|---|---|
| Cache | /data/local/tmp or /cache | Temporary update files, log files | Low. |
| Thumbnails | /storage/emulated/0/DCIM/.thumbnails | Image and video miniatures | Low (to be recreated) |
| Download | /storage/emulated/0/Download | APK-files, old downloads | No. |
| Dalvik-cache | /data/dalvik-cache | Android virtual machine cache | Medium (requires root rights) |
| Log | /data/log or /sdcard/log | Error logs and system logs | Low. |
Step-by-step:
- Open the file manager (such as Mi File Manager) and enable the display of hidden files in the settings.
- Cross the path. /storage/emulated/0 (internal memory) and delete the contents of folders: DCIM/.thumbnails โ Download - old downloads (pre-check the contents!). Android/data โ Here you can store caches of games and applications (delete the folders of remote programs).
/cache
root
ADB
โ ๏ธ Attention: Do not delete folders Android/obb โ This is where game data is stored (like Genshin Impact or Call of Duty Mobile) and if it is deleted, it will require re-uploading several gigabytes of data.
Make a backup copy of important data|Check the free space on the device|Close all working applications|Disable synchronization of cloud services-->
Method 3: Clear Dalvik and ART cache via Recovery Mode
Dalvik cache (or ART in newer versions of Android) is optimized data to speed up applications. Over time, it fragments and can take up to 1-2 GB of space. Cleaning through Recovery Mode is the most efficient way, but requires caution.
Instructions:
- Turn off your smartphone.
- Press the button combination to enter Recovery Mode: For most Xiaomi/Redmi/POCO: Volume up + Power. On some models (e.g. POCO F3): Volume down + Power.
Recovery
Wipe & Reset โ Wipe Cache
Advanced โ Wipe Dalvik Cache
Confirm the action and wait until it is completed (usually takes 1-2 minutes).
Reboot โ System
Once cleaned, the first run of the system may take longer โ that's normal, as MIUI reassembles the app cache.
- โก Accelerate the opening of applications by 15-30%.
- ๐ Release up to 1.5 GB of memory.
- ๐ Errors such as โThe application does not respondยป.
What to do if the phone does not turn on after cleaning Dalvik?
Method 4: Using ADB for deep cleaning
If you have access to a computer, you can use Android Debug Bridge (ADB) to delete temporary files that are not available through standard methods.
- ๐๏ธ System cache (/cache).
- ๐ Residual update files (/data/ota_package).
- ๐ง Log files of the kernel (/data/tombstones).
Instructions:
- Install ADB and Fastboot Tools on PC.
- Turn on USB debugging on your smartphone: Go to Settings โ About Phone โ MIUI version and tap 7 times on this item to activate Developer Mode. Return to Settings โ Additional โ For Developers and enable USB Debugging.
cmd
Terminal
adb devices(Your device should be displayed)
adb shell
su
rm -rf /cache/*
rm -rf /data/local/tmp/*
rm -rf /data/log/*
exit
exitIf you donโt have root rights, su commands wonโt work, in which case, limit yourself to cleaning /sdcard/Android/data via ADB:
adb shell rm -rf /sdcard/Android/obb/*/main.*OBBโ ๏ธ Attention: Rm teams -rf File deletion is irrevocable. Misuse can lead to data loss or system damage!
๐ก
ADB allows you to clear system folders that are not available through standard methods, but you need to be careful. If you are not sure about the commands, use alternative methods.
Method 5: Applications for automatic cleaning
If manual methods seem complicated, you can use third-party utilities, and we tested several applications and selected the most effective ones for Xiaomi:
| Annex | Functions | Pluses | Cons |
|---|---|---|---|
| SD Maid | Cleaning cache, duplicates, residual files | Deep scanning, root support | Paid version for full functionality |
| CCleaner | Delete cache, history, temporary files | Simple interface, optimization of RAM | Advertising in the free version |
| Files by Google | Cleaning up garbage, duplicates, large files | Safe, from Google. | Does not remove the system cache |
| Xiaomi Cleaner | Specialized for MIUI | Integration with the system, cleaning Dalvik | Requires root for some functions |
Recommendations for use:
- ๐ Before cleaning, check which files the app suggests you delete (sometimes they flag important data as โjunk).
- ๐ก๏ธ Avoid โoptimizersโ promising to โspeed up your phone by 200%โ โ this is often a marketing ploy.
- ๐ Repeat cleaning regularly (once every 1-2 weeks) as temporary files accumulate quickly.
๐ก
SD Maid has a โCorpseFinderโ feature, which finds residual files from remote applications that standard cleaners do not see.
Method 6: Resetting cache via Safe Mode (Safe Mode)
If the smartphone is slowing down and standard methods do not help, you can try cleaning through Safe Mode.In this mode, only system applications are downloaded, which allows you to delete temporary files blocked by third-party programs.
How to activate Safe Mode:
- Turn off the phone.
- Press the power button and hold it until the MIUI logo appears.
- Once the logo appears, release the power button and immediately press and hold the volume down button.
- Hold it until the phone boots into Safe Mode (the bottom left corner will read โSafe Modeโ).
Further action:
- Open the file manager and manually delete temporary files (see Method 2).
- Run Optimization** and clean it up (it works more efficiently in Safe Mode).
This method is useful if:
- ๐ซ Applications are not removed in the standard way.
- ๐ฑ Phone freezes when trying to clean.
- ๐ You need to delete files that are occupied by system processes.
Method 7: Preventing the accumulation of temporary files
The best way to deal with temporary files is to prevent them from accumulating. Here are some tips for Xiaomi users:
- ๐ Turn off automatic app updates in the Google Play Store (or limit it to Wi-Fi only). APK-file.
For advanced users:
- ๐ ๏ธ Install a custom core (such as FrancoKernel) that optimizes cache management.
- ๐ฆ Use Magisk modules like Universal. GMS Doze to limit background activity of applications.
๐ก
Regular cleaning (once every 1-2 weeks) prevents the accumulation of gigabytes of garbage and prolongs the life of your Xiaomi.