How to completely clear hidden cache on Xiaomi: 5 proven ways

Hidden cache on Xiaomi smartphones is one of the most mysterious and problematic areas for users. Unlike the standard app cache, which is cleared in two clicks, the system cache (aka Dalvik-cache and hidden temporary MIUI files) accumulates stealthily, but can take up gigabytes of memory, leading to brakes, spontaneous reboots and even errors when updating the firmware.

In this article, we’ll not only look at how to find and remove hidden cache on any Xiaomi device (from Redmi Note 10 to Xiaomi 14 Ultra), but also explain why standard methods through Settings β†’ Storage don’t work. You’ll learn about hidden ADB commands, secret menus of engineering mode and safe ways to clean without the risk of bricking your phone. And also how to prevent re-accumulation using built-in MIUI tools.

What is hidden cache on Xiaomi and why it can not be deleted in standard ways

A hidden cache is a collection of system files that MIUI (Xiaomi firmware) creates to speed up the OS, but does not show the user in the interface.

  • πŸ“ Dalvik-cache – Optimized versions of applications for the Android virtual machine (files with the extension.dex and.oat).
  • πŸ—ƒοΈ Update cache – temporary firmware files that remain after installing OTA-apats.
  • πŸ”„ System Logs - Error Logs (/data/log), weighable 500 MB.
  • πŸ“± Cash. MIUI β€” Hidden files of themes, animations and system applications (com.miui.*).

The problem is that even after you click the Clear Cache button in the storage settings, these files remain intact, and some of them (like Dalvik-cache) are automatically restored by the system after a few hours, and this is due to the Android architecture: the OS considers these files to be critical for stable operation.

⚠️ Warning: Removing hidden cache manually without backup can lead to a cyclic phone restart (bootloop), especially risky on devices with unlocked bootloader or custom firmware.

According to tests of the laboratory Xiaomi, on devices with MIUI 14 And the newest hidden cache can take up to 3–5 GB of memory after a year of use, and this is despite the fact that the user regularly cleans the phone through standard tools, and the lion's share of the garbage is in files. /data/dalvik-cache and /data/system/package_cache.

Method 1: Cleaning through an engineering menu (without root and PC)

The safest method is to use the hidden MIUI engineering menu, which is available on all Xiaomi smartphones without the need for root permissions, which is suitable for devices on MIUI 12-14 and removes up to 80% of hidden cache.

Instructions:

  1. Open the Phone app and enter the combination: ##4636##.
  2. In the menu that appears, select Battery Information (don’t be afraid of the name – this is a localization bug).
  3. Slip 5 times on the Android version until you become a developer!
  4. Go back to the basic settings of the phone, open Additional β†’ For developers.
  5. Activate the Don’t Keep Activities switch and restart the device.

Once rebooted, the system will automatically clear some of the hidden cache, including temporary application files and some logs.This method does not affect Dalvik-cache, but is safe even for beginners.

Charge your phone at least 50% | Backup important data | Disable two-factor authentication in Mi Account (if enabled) | Remember the password from your Xiaomi account (required after rebooting)

-->

The method is effective: about 1-1.5 GB of freed memory on devices with 6+ months of use.

Method 2: Use of the ADB-Teams (for experienced users)

If the engineering menu didn't work, the next step is to connect the phone to a PC and use Android Debug Bridge (ADB).This method removes Dalvik-cache and other hidden files, but requires minimal technical skills.

What you need:

  • πŸ’» Computer with Windows/macOS/Linux.
  • πŸ“‹ Installed Xiaomi drivers (download from the official website).
  • πŸ”§ Utility. ADB (Installation instructions: Android Studio).
  • πŸ”Œ USB-cable (preferably original).

Step-by-step:

  1. Turn on the phone Debugging over USB (Settings β†’ About Phone β†’ MIUI version – tap 7 times, then go back to Additional β†’ For developers).
  2. Connect the phone to the PC and in the command line (terminal) enter: adb devices Make sure that the device is determined (should appear its serial number).
  3. Follow the commands in turn: adb shell su rm -rf /data/dalvik-cache/* rm -rf /data/system/package_cache/* exit exit ⚠️ Note: If you enter su with a Permission denied error, you don't have root rights on your device. In this case, skip this command and use only rm. -rf /data/dalvik-cache/* sue.
  4. Reboot your phone with the command: adb reboot

After the reboot, the system will recover critical files, but the amount of hidden cache will be reduced by 2-3 GB. This method is most effective for devices with MIUI 13+, where standard cleaning tools often do not work.

What if the ADB can’t see the device?
If the adb device command does not show your phone: 1. Check if debugging is enabled by USB and whether you are allowed to connect to this PC (you will receive a request on your phone). 2. USB-cable (cheap cables often don't support data transfers). 3. Install drivers manually through Device Manager (select "Update driver" β†’"Perform a search on this computer" β†’ put the folder ADB). 4.Reboot both the phone and the PC.

Method 3: Cleaning with Recovery Mode (without data loss)

If ADB seems too complicated, the alternative is to use Recovery Mode, which does not require a PC, but only removes a portion of the hidden cache (mostly temporary update files and logs).

How to get into Recovery Mode:

  1. Turn off the phone.
  2. Press the Power + Volume buttons up at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. In the recovery menu, select the language (if you have an option), then go to Wipe & Reset.
  4. Select Wipe Cache (NOT Wipe Data is a factory reset!).
  5. Confirm the action and wait for the completion (it will take 1-2 minutes).
  6. Restart your phone via Reboot.

This method is safe, but only clears 300-800 MB of hidden cache, and its main advantage is that there is no risk of damage to the system, so it is suitable for beginners.

Standard cleaning through Settings|Engineering menu|ADB-team|Recovery Mode|Never cleaned a hidden cache.

-->

Method 4: Forced Dalvik-cache reassembly (for advanced)

On root-rights or custom-recovery (TWRP) devices, you can completely reassemble Dalvik-cache, which not only cleans up the garbage, but also speeds up the system, a method recommended if the phone slows down after upgrades.

Instructions for TWRP:

  1. Boot in TWRP (similar to Recovery Mode, but with Power + Volume up for longer than 15 seconds).
  2. Go to Advanced β†’ File Manager.
  3. Delete the folders: /data/dalvik-cache /data/system/package_cache

Wipe β†’ Dalvik / ART Cache

Reboot your phone. It'll take 5 to 10 minutes to boot up the first one, which is fine.

For devices without root, you can use the SD Maid app (Pro version is required):

  • Open SD Maid and go to CorpseFinder.
  • Press Run and wait for the scan.
  • Select Dalvik Cache and System Cache, then press Clean.

⚠️ Note: After forced Dalvik-cache reassembly, some applications may not work in a stable way for the first hours, because the system re-optimizes them for your device. If problems persist for longer than a day, reset through Settings β†’ System system β†’ Resetting settings (without deleting data).

Method 5: Automatic cleaning through hidden MIUI settings

MIUI has a built-in tool for automatically cleaning hidden cache, but it's hidden in the depths of settings.This method is suitable for devices on MIUI 14 and later, where developers have added Deep Clean feature.

How to turn on:

  1. Open the Settings. β†’ The phone.
  2. Tap 10 times on the MIUI version until the message appears You have activated the superuser mode!
  3. Return to the main settings and open Additional β†’ Special features β†’ System settings.
  4. Find the Deep Clean item and activate it.
  5. Choose Clean each week or Clean at low memory.

This function removes:

  • πŸ—‘οΈ Temporary update files (/cache/ota).
  • πŸ“Š System logs older than 7 days.
  • πŸ”„ Cache of preloaded applications (bloatver).

The advantage of the method is full automation. The disadvantage: it does not clean Dalvik-cache, so it is better to combine with ADB or Recovery Mode for a complete cleaning.

-->

How to prevent the re-accumulation of hidden cache

Cleaning the cache, if you don't eliminate the reasons for the accumulation, here are 5 rules to keep the system clean:

Problem.DecisionThe effect
Frequent updates to MIUITurn off automatic download of updates in Settings β†’ About phone β†’ System update.Reduces the file size in /cache/ota by 500–1000MB.
Background activity of applicationsLimit background work through Settings β†’ Apps β†’ Permissions β†’ Autostart.Reduces size package_cache on 30–40%.
Systems bloatwerRemove unnecessary Xiaomi apps via ADB: adb shell pm uninstall --user 0 com.miui.weatherIt releases 1-1.5 GB in /data/app.
Logs of errorTurn off the collection of logs in Settings β†’ Additional β†’ For developers β†’ Disable log recording.Prevents the growth of /data/log folder.
Cash Google Play ServicesClean the Google Play Services cache once a month manually (Settings β†’ Apps β†’ Google Play Services β†’ Storage).Reduces the volume of /data/data/com.google.android.gms.

We also recommend using Files by Google for regular garbage scanning, and unlike standard MIUI Cleaner, it finds hidden temporary files, such as remnants of deleted applications in the /data/data folder.

-->

FAQ: Frequent questions about hidden cache on Xiaomi

❓ Why the phone has become slower after cleaning the cache?
It takes time (30 minutes to a day) to recover critical cache files, especially Dalvik-cache. Apps will run longer in the first hours after cleaning, as the OS re-optimizes them. If the brakes last longer than 24 hours, check for free space in memory (should be at least 10% of the total).
❓ Can I clean a hidden cache without a computer?
Yes, there are three ways to do it without a PC: through Recovery Mode (method 3 in the article); through applications like SD Maid (root required); through the engineering menu (method 1); however, the most complete cleaning is provided by ADB, since it allows you to remove Dalvik-cache.
❓ Is it dangerous to remove Dalvik-cache?
Deleting Dalvik-cache is not dangerous to the system, but can cause temporary crashes in the application. Android will automatically restore these files the next time the applications are launched, but: 🚫 Do not remove Dalvik-cache on custom firmware devices – this can lead to bootloop. ⚠️ On the phones with MIUI 12 and older after deleting the cache, the sound may disappear in some applications (rebooted is solved by rebooting). βœ… On stock firmware. MIUI 13-14 risk is minimal.
❓ How much memory is released after complete cleaning?
The amount of freed memory depends on the phone model and the duration of use: Xiaomi Redmi Note 10/11: 1.5-2.5 GB. Xiaomi 12/13 series: 2-3.5 GB. POCO F3/F4: 2.5-4 GB (due to aggressive caching of game files). On new devices (less than 6 months of use), the effect will be less – about 500-1000 MB.
❓ Why the hidden cache is coming back?
The hidden cache is not garbage, it's the work files of the system: πŸ”„ Android optimizes apps for your hardware (this is a normal process). πŸ“± MIUI caches data to speed up the interface (animations, themes). πŸ”„ Firmware and application updates create new temporary files. You can't completely disable caching, but you can control the volume of caching using methods from the section "How to prevent accumulation".