Cache Cleanup on Xiaomi with MIUI 12: All the Ways to Speed Up Your Phone

Why should the cache be cleaned regularly?

Xiaomiโ€™s MIUI 12-based smartphones eventually start to slow down, warm up and discharge faster โ€” even if you havenโ€™t installed new apps. The main reason is cache clogging, which is a temporary data buffer created to speed up programs, but uncontrollably turns into โ€œdigital junkโ€ that takes up gigabytes of memory.

In MIUI 12, the cache is divided into three types: application cache (data from individual programs), system cache (OS files), and Dalvik cache (optimized code for fast loading), the latter being especially important: cleaning it can solve problems with โ€œdeparturesโ€ of applications after updates. But hereโ€™s the caveat: improper cleaning of the Dalvik cache without rebooting leads to cyclical errors in launching applications.

Not only does the cache shrink, but it fragments, and when memory is crammed with small files, it takes longer for the system to process them, for example, Google Play Services cache can take up to 1GB, and instant messengers like Telegram or WhatsApp can take up to 500MB each, while manually cleaning through settings does not remove all temporary files.

Method 1: Clearing the cache of individual applications

The safest method is to remove the cache for specific programs, which won't affect their work, but will free up space. In MIUI 12, the path to the cleanup menu has changed from previous versions:

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Slip on the three dots in the upper right corner and select Sort by size.
  3. Click on an app (such as Facebook or YouTube) and select Warehouse.
  4. Click Clear Cache (not to be confused with Clear Data!).

โš ๏ธ Note: Do not clear the cache for Google Play Store, Google Play Services and MIUI System is not absolutely necessary. This can lead to application update errors and malfunctions in Google services.

Cache size applications > 200 MB|Social media (VK, Instagram, TikTok)|Messengers (Telegram, WhatsApp)|Games (PUBG, Genshin Impact)|Navigators (Google Maps, Yandex.Maps)-->

To speed up the process, use a cache filter. Apps with more than 100MB of temporary files usually give performance gains after cleaning. For example, Instagram cache can take up to 1.5GB, and TikTok can take up to 2GB when used actively.

Method 2: Mass cleaning the cache of all applications

If you donโ€™t have time to manually clean up, use the built-in MIUI 12 to mass-delete the cache, which removes temporary files from all user applications except system ones:

  1. Go to Settings โ†’ Storage โ†’ Cleaning.
  2. Click the app cache (usually displayed at the top of the list).
  3. Confirm the action with the Clean button.
Type of dataRemoved?Effects of consequences
Cash app.โœ… Yes.Applications are loaded longer on first launch
Application dataโŒ No.Logins, settings and progress in games will continue
Download filesโŒ No.Music, documents and photographs will remain
System updatesโŒ No.Does not affect the stability of MIUI

After a mass cleanup, it is recommended to restart the phone, which is due to the fact that some applications (for example, MIUI Launcher) cache data in RAM. Without a reboot, the cleaning effect will be incomplete.

Once a week | Once a month | Only when the phone brakes | Never cleaned | I don't know what it is-->

Method 3: Cleaning Dalvik cache (for power users)

Dalvik cache is an optimized file on the Android virtual machine that speeds up the launch of applications. In MIUI 12, cleaning it is rarely required, but can help after a system update or if errors like com.android.phone are stopped.

โš ๏ธ Warning: Improperly cleaning the Dalvik cache without restarting to recovery results in an โ€œinfinite loadโ€ of the phone, a method that is only recommended if you are confident in your actions or follow the recovery instructions.

  1. Turn off the phone.
  2. Press the Power button + Volume up to enter Recovery Mode.
  3. Select Advanced โ†’ Wipe Dalvik Cache (use volume buttons for navigation).
  4. Confirm the action and restart the phone.
What to do if the phone freezes after cleaning the Dalvik cache?
If after cleaning the Dalvik cache, the phone boots for more than 10 minutes or reboots cyclically, follow the following steps: 1. Log in Recovery Mode again. + Volume up). 2. Select Wipe data โ†’ Wipe All Data (this will reset the phone to factory settings!!) 3. After the reset, reinstall the applications and check the system. If the problem persists, you need to flash it through Fastboot or contact the service center.

Cleaning Dalvik cache is useful if:

  • ๐Ÿ“ฑ Phone is getting an error android.process.media stopped.
  • ๐Ÿ”„ Apps are painted immediately after the update MIUI.
  • ๐Ÿข The system slows down despite a sufficient amount of free memory.

Method 4: Using the built-in MIUI optimizer

MIUI 12 has a built-in Security tool (formerly Optimizer) that automatically analyzes and cleans the cache, and its advantage is to cleverly delete only unnecessary files, without the risk of damaging system data.

  1. Open the Security app (the shield icon).
  2. Go to the Cleanup tab.
  3. Press Deep Clean and wait for the analysis to be completed.
  4. Select the Cash applications and confirm the cleanup.

Unlike manual cleaning, this method:

  • ๐Ÿ” Analyzes unused files (e.g. thumbnails of images that have not been opened in a long time).
  • ๐Ÿ“Š Shows a detailed report on which apps take up the most space.
  • ๐Ÿ”„ Offers regular cleaning on schedule (e.g. once a week).

๐Ÿ’ก

If you see an app with a cache of more than 500MB in your SEO report but donโ€™t use it often, consider removing it. For example, Facebook and Messenger can take up to 3GB of cache when youโ€™re using it, but theyโ€™re easy to replace with Facebook Lite or the web.

Method 5: Cleaning the cache through ADB (for developers)

For users with unlocked bootloader and enabled debugging over USB, a method of clearing the cache through ADB is available. This method is useful if the phone does not respond to touch or you need to clear the cache of system applications.

Before we start:

  • ๐Ÿ–ฅ๏ธ Install. ADB Tools on the computer (official page).
  • ๐Ÿ“ฑ Enable Developer Mode on your phone: Settings โ†’ The phone. โ†’ Version. MIUI (tap 7 times).
  • ๐Ÿ”Œ Connect your phone to your PC and allow debugging. USB.

Cleanup commands:

adb shell pm clear --user 0 com.android.providers.media # Clearing up media provider's cache


adb shell cmd package bg-dexopt-job # Optimization of Dalvik cache




adb shell pm trim-caches 500M # Cache Clearing of all applications (500MB โ€“ threshold)

โš ๏ธ Note: pm clear command will reset application data (including logins)! To clean only the cache use:

adb shell pm clear --user 0 -f com.example.app # Replace com.example.app with the app package

What if cleaning the cache doesnโ€™t help?

If after cleaning the cache, the phone still brakes, the problem may be a nuisance:

  • ๐Ÿงน Memory clogging: Check the free space in the Settings section โ†’ If less than 10%, delete the files or transfer them to the storage. SD-map.
  • ๐Ÿ”„ Memory fragmentation: B MIUI 12 no built-in defragmenter, but rebooting or resetting to factory settings will help.
  • ๐Ÿ› Firmware failures: If the brakes appeared after the update, try rolling back to the previous version MIUI via Fastboot.
  • ๐Ÿ”‹ Battery wear: With battery health below 80% (checked through ##4636##) the phone begins to artificially limit performance.

๐Ÿ’ก

If the cache cleanup fails, check the background activity of the apps in Settings โ†’ Battery โ†’ Battery Use. Apps like Facebook or AliExpress can consume up to 30% of the charge in the background, which indirectly affects performance.

For diagnosis, use the hidden test menu:

  1. Enter the dialer ##4636##.
  2. Go to Battery Information and check the Wear Level parameter.
  3. In the Usage Statistics section, see what processes load the CPUs.

FAQ: Frequent questions about cleaning up cache on Xiaomi

Can I clean the cache of system applications (e.g. MIUI Launcher)?
Clearing the cache of system applications is possible, but with caution, for example, cleaning the cache of the MIUI Launcher will lead to resetting the location of icons on the desktop, and cleaning Google Play Services can disrupt the work of Google services (for example, contact synchronization), it is better to clear the cache of only those system applications that clearly cause errors.
Why do applications load longer after cleaning the cache?
This is normal behavior. Cache stores temporary data for quick access (such as thumbnails of images or cached pages), after cleaning, applications have to download this data again, usually the delay disappears after 1-2 launches of the program.
How often should I clear the cache on Xiaomi with MIUI 12?
Optimal frequency depends on usage: Active users (many apps, games, social networks) - every 1-2 weeks. Average use (messaging, calls, photos) - once a month. Minimum use - once every 2-3 months or when brakes appear. Signs that it's time to clean the cache: the phone is warming for no reason, the applications are dyed, or in Settings โ†’ Storage you can see that the cache takes more than 3-5 GB.
Can cache cleaning be automated?
Yes, there are two ways to do MIUI 12: Through Security: Open Security โ†’ Cleanup โ†’ Settings (cogs) โ†’ Auto Cleanup. Set a schedule (e.g. every Sunday at 3:00). Through Tasker: Use the task with pm trim-caches 1G (root or ADB rights required). Autoclean only removes secure temporary files without affecting application data.
Does cache clearing delete my photos or messages?
No, cleaning the cache doesn't affect it: ๐Ÿ“ธ Personal photos and videos (they are stored in the DCIM or Pictures). ๐Ÿ’ฌ Messages in messengers (they are stored in Application Data). ๐ŸŽต Downloaded music (unless it is cached by an app like Spotify) but clearing the app data (not the cache!) will delete logins, settings and stored files inside the program!