How to completely clear the cache on Xiaomi: system, applications and Dalvik

Why Cache Clearing on Xiaomi is Not Always an Obvious Task

Cache on Xiaomi smartphones (including Redmi, POCO, and Black Shark) accumulates faster than on other brands, due to aggressive optimization of MIUI, which actively caches data to speed up the interface and applications. However, over time, this β€œjunk” takes up gigabytes of memory, slows down the system and can cause crashes from accidental reboots to errors in games.

The problem is that standard cleaning through Settings β†’ Memory only removes the app surface cache, leaving the system cache, Dalvik cache (Android virtual machine) and hidden micro-G files (Google services for China) intact. In this article, we will break down all the levels of cleaning, including those that are not visible in the basic MIUI menu, but critically affect performance.

1. Clearing the cache of individual applications (basic method)

The safest way is to remove the cache for specific programs, which won't affect their data (logins, saves), but will free up space, which is fine if the phone starts to slow down after installing new apps or updates.

How to do this:

  • πŸ“± Open the Settings. β†’ Annexes β†’ Application management
  • πŸ” Select the desired application (for example, Facebook, Telegram or Google Play Store)
  • 🧹 Press Warehouse. β†’ Clear the cache
  • 🚫 Do not click β€œClear Data” – this will delete all settings and accounts in the application!

For mass cleaning:

  1. Go to Settings β†’ Memory β†’ Cleanup
  2. Click Select data for cleaning β†’ tick unnecessary files
  3. Confirm the action with the Clear button (usually at the bottom of the screen)

πŸ’‘

If the app gets slower after cleaning the cache, that's OK, the system caches the data again the next time it starts, and wait 5-10 minutes of active use, and the speed will recover.

2. Deep cleaning of system cache via Recovery Mode

System cache (/cache) store temporary files MIUI, Android kernels and updates. Cleaning it helps with:

  • 🐒 Slowing down animations and transitions between screens
  • πŸ”„ Fixed Updates ("Infinite Download")
  • πŸ“± Failures after firmware or update MIUI

Instructions for all Xiaomi models (including Redmi Note 12, POCO X5, Mi 11):

  1. Turn off the phone.
  2. Press the Power button + Volume up simultaneously until the Mi logo appears (about 10 seconds).
  3. From the Recovery menu (English or Chinese), select Wipe & Reset β†’ Wipe Cache.
  4. Confirm the action with the swipe or the Yes button.
  5. After cleaning, select Reboot β†’ Reboot to System.
What happens if you clear the system cache?
It's safe, only temporary files will be deleted, and the next time you turn on, MIUI will automatically restore the data you need, but the first run after cleaning can take 1-2 minutes longer than usual.

⚠️ Note: If there is no Wipe Cache option in Recovery Mode, then your device has custom firmware installed (for example, Pixel Experience or LineageOS). --wipe_cache computer.

3. Cleaning Dalvik cache (for advanced users)

Dalvik cache is an optimized file on the Android virtual machine that speeds up the launch of applications.

  • πŸ€– Applications suddenly close with the error "Application stopped"
  • πŸ“¦ After updating MIUI Some programs have stopped opening.
  • πŸ”§ You have recently obtained root rights and want to avoid conflicts.

Method 1: TWRP Recovery (requires an unlocked bootloader):

  1. Load to TWRP (clip Power + Volume Up).
  2. Choose Advanced β†’ Wipe Dalvik Cache.
  3. Swipe for confirmation.
  4. Reboot to the system.

Method 2: Through ADB (no root, but command line skills are needed):

adb shell


su




rm -r /data/dalvik-cache/*




reboot

⚠️ Warning: Cleaning the Dalvik cache without rebooting can lead to a bootloop.Always restart the phone immediately after the procedure!

4. Hidden cache files: micro-G, Google Services and MIUI Bloatware

MIUI for both global and Chinese versions contains an β€œinvisible” cache from:

  • πŸ€– Micro.-G (Google's services for China are cut down by 500 MB
  • πŸ“¦ Pre-installed apps (Mi Video, Mi Music, GetApps)
  • πŸ” System logs (/data/log/ and /sdcard/MIUI/debug_log/)

How to remove them:

Type of fileWayIs it safe to remove?Cleaning method
MIUI Logs/sdcard/MIUI/debug_log/Yes.Through any file manager
Cash micro-G./data/app/com.google.*Partially (may break Google Play)Only through ADB or root
Cash of system applications/data/data/com.miui.*No (risk of failure) MIUI)Better to disable through Settings β†’ Applications
Thumbnails (miniatures)/sdcard/DCIM/.thumbnailsYes.Delete the folder manually

To remove hidden files without root, use the ADB command:

adb shell pm clear com.miui.analytics # Cleanup of MIUI Analytics


adb shell pm clear com.xiaomi.market #Cache cleanup Mi App Store

πŸ“Š How often do you clear your Xiaomi cache?
Once a week.
Once a month
Only when the phone is slowing down.
Never cleaned.
I don't know what that is.

5. Automatic cache cleaning: MIUI settings and third-party utilities

MIUI has built-in tools for automatic cleaning, but they don't work well. Here's how to set them up:

  1. Open Settings β†’ Memory β†’ Auto Clean.
  2. Turn on the option to Clear the cache when you lock the screen.
  3. Set a limit for notifications (recommended 1-2 GB).

For deep automatic cleaning, use the following applications:

  • πŸ› οΈ SD Maid (requires root for full functionality)
  • 🧹 Files by Google (free, no root)
  • πŸ” CCleaner (caution – can delete files!)

β˜‘οΈ Preparation for automatic cleaning

Done: 0 / 4

⚠️ Note: Applications such as Clean Master or DU Speed Booster often displays false "optimizations" and can become a source of cache. Use only proven utilities from the list above.

6.What NOT to do when cleaning cache on Xiaomi

Some "tips" from the Internet can harm your device.

  • 🚫 Deletion of the folder /data/app-lib/ β€” This will lead to the collapse of all applications.
  • 🚫 Cleaning boot or system partitions – the phone won’t boot.
  • 🚫 Using fastboot erase cache commands on a locked bootloader is a risk of β€œbrick".
  • 🚫 Deletion of files from /sdcard/Android/obb/ β€” This is game data (eg Genshin Impact or Call of Duty Mobile), their loss means re-downloading gigabytes of data.

If you accidentally delete critical files:

  1. Don’t panic – Xiaomi has a system recovery mechanism.
  2. Restart your phone in Safe Mode (clip Power β†’ Click "Switch off power" before the prompt to go to Safe Mode appears).
  3. If the phone is not turned on, use the instructions from the FAQ to restore using the Mi Flash Tool.

πŸ’‘

Clearing the cache does not increase the amount of permanent memory (ROM), it releases only RAM and temporary files. To free up space under the photo / video, you need to delete unnecessary applications or transfer files to the memory card.

FAQ: Frequent questions about cleaning up cache on Xiaomi

❓ After cleaning the cache, the phone warmed up?
Yes, the first 10-15 minutes after cleaning, the system actively recovers cached data, which increases the load on the processor. If the heating is maintained for longer than an hour, check the background processes in Settings β†’ Battery β†’ Battery Use.
❓ Can I clear the cache without losing application data?
Yes, clearing the cache does not affect user data (save games, logins, chats), only the Clear Data option is dangerous - it will reset the application to the factory settings.
❓ How to Clear Cache on Xiaomi with Broken Screen?
Connect your phone to your PC via USB, enable USB Debugging (if activated previously) and use ADB commands: adb shell pm clear --user 0 com.miui.home # Clear the launcher cache adb shell rm -rf /data/local/tmp/* # Delete temporary files If debugging is not enabled - it remains only to unlock the bootloader and flash a clean MIUI through Fastboot.
❓ How much space should be freed up after the cache is completely cleaned?
Depends on the model and the number of installed applications: Redmi 9A/POCO M3: 1.5–3 Xiaomi GB 12/Redmi Note 11 Pro: 3–6 GB Black Shark 5: before 8 GB (due to cache of games) If less is free 500 MB - the cache is not completely cleared (see section about Dalvik-cache).
❓ The phone won't turn on after cleaning the cache through Recovery?
The critical system file was probably deleted. Solutions: Try to boot into Safe Mode (see the instructions above). If it doesn't work, run your phone through Mi Flash Tool: Download the firmware for your model from the official website. Unpack the archive and launch it. flash_all.bat (Connect the phone turned off to the PC by holding Volume down + Meals. Contact the service center if you don't have firmware experience.