How to completely clean internal memory on Xiaomi smartphones: from cache to factory settings

Xiaomiโ€™s internal memory is one of the most common causes of brakes, app install errors, and sudden reboots. Even on top-end models like the Xiaomi 14 Ultra or Redmi Note 13 Pro+, users face space shortages after 6-12 months of active use. The problem is not the storage capacity, but how the system manages data: app cache, duplicate photos, residual files after updates, and hidden debris from MIUI can occupy up to 30% of the total.

This article is not about deleting photos or cleaning the cart. We will break down system methods that allow you to free up 2 to 15 GB of memory without losing important data, including little-known features like Storage Analyzer (available with MIUI 12), manual cleaning of the /data/local/tmp folder and safe reset via Fastboot for advanced users. All instructions are tested on current firmware in 2026 and are compatible with 95% of Xiaomi, Redmi and POCO devices.

1.Diagnosis: Why memory ends so quickly

Before you clean up your memory, you need to understand what it's doing. MIUI has a built-in analysis tool, but it hides some of the data, for example, system update files (OTAs) or Google Play Services cache can weigh a few gigabytes, but show up as "Other."

To get a full picture:

  • ๐Ÿ“Š Open the Settings. โ†’ The phone. โ†’ Memory (or Warehouse in newer versions) shows the total volume and categorization.
  • ๐Ÿ” Click on category (e.g., โ€œApplicationsยป) โ†’ ยซDetailsยป โ†’ Sort by size. Pay attention to cache-sized applications. >500MB.
  • ๐Ÿ“ Use a file manager (such as Mi File Manager) and go to the file manager. /storage/emulated/0. Folders. DCIM, Downloads and Android/data Usually takes up the most space.

Critical information: On devices with MIUI 14+ folder /data/app can weigh up 8 GB due to duplication APK-files after updates. It can't be cleaned manually, only through a reset or ADB.

๐Ÿ“Š How often do you clear your memory on Xiaomi?
Once a week.
Once a month
Only when the place ends.
Never cleaned.

2. Cleaning cache and unnecessary files without root

The safest way to free up 1-3GB is to remove the app cache and system debris, which, unlike manual file deletion, does not affect user data.

Instructions:

  1. Go to Settings โ†’ Applications โ†’ Application Management.
  2. Slip on the three dots in the upper right corner โ†’ โ€œSort by sizeโ€.
  3. Select an app with a large cache (e.g. YouTube, Telegram, Google Chrome) โ†’ Storage โ†’ Clear cache.
  4. For mass cleaning, use Settings โ†’ Memory โ†’ Clean (the โ€œCleanโ€ button at the bottom of the screen).

For deep cleaning:

  • ๐Ÿงน Remove files from Downloads โ€“ outdated ones often accumulate here APK documents.
  • ๐Ÿ—‘๏ธ Clear the Recycle Bin in the Gallery and File Manager (files are stored there for up to 30 days).
  • ๐Ÿ“ฅ B Settings โ†’ Memory. โ†’ Find the category โ€œBig Filesโ€ and delete unnecessary videos/archives.

โ˜‘๏ธ Checklist before cleaning the cache

Done: 0 / 4

โš ๏ธ Note: Do not cache system applications like com.android.systemui or com.miui.home manually through the ADB. This can lead to a cyclical reboot (bootloop).

3. Removal of duplicates and optimization of photo/video

Photos and videos take up 50 percent of the memory on most devices, and the problem is not how many, but how MIUI processes media files.

  • ๐Ÿ“ธ Duplicates: When imported from other devices or edited, copies are created in the Xiaomi Gallery.
  • ๐ŸŽฅ Cash thumbnails: The.thumbnails folder can weigh up to 1GB.
  • ๐Ÿ”„ Authorization: Mi Cloud and Google Photos keep local copies even after synchronization.

How to clean:

  1. Duplicates: Use the built-in Gallery tool โ†’ Albums โ†’ Duplicates (available with MIUI 13). Or install Files by Google โ†’ Cleanup โ†’ File Duplicates.
  2. Cache thumbnails: Delete /storage/emulated/0/DCIM/.thumbnails folder through file manager (requires to show hidden files).
  3. Optimize: In Google Photos, turn on โ€œFree Spaceโ€ (Settings โ†’ Free Space) to remove local copies of already uploaded photos.

Pro tip: If you shoot 4K/60fps videos frequently, transfer them to a microSD (if supported) or cloud. One hour of video at that resolution weighs ~40GB.

๐Ÿ’ก

Before deleting the photo, check the DCIM/Screenshots folder โ€“ screenshots for several years that take up gigabytes can lie here.

4. Cleaning up system debris through hidden MIUI functions

MIUI has hidden deep cleaning tools that are not available through the standard menu, such as Storage Analyzer, which shows files that are usually hidden from the user (system logs, temporary update files, etc.).

How to activate:

  1. Open the phone and enter the code ##4636##.
  2. Select "Storage" (Storage) โ†’ wait for the analysis.
  3. In the โ€œOther filesโ€ section, you will see files that can be safely deleted (e.g..log,.tmp).

Additional methods:

  • ๐Ÿ“ฆ Delete the folder. /data/local/tmp through ADB: adb shell su rm -rf /data/local/tmp/* (Root or unlocked bootloader rights required).
  • ๐Ÿ—ƒ๏ธ Clear the cache. ART/Dalvik (Speed up the system: adb shell su rm -rf /data/dalvik-cache/* Note: After this command, the device restarts longer than usual.

โš ๏ธ Note: Removing files from /data/data Without the structure, it's going to crash applications, like cleaning up. /data/data/com.android.providers.media Destroy the entire media base (photos and videos will disappear from the gallery).

5. Reset to factory settings: when necessary

If less than 10% of memory is free after all the manipulations and the system is slowing down, itโ€™s time to do a hard reset, which deletes all data, including accounts, settings and installed applications, but returns the device to a โ€œcleanโ€ state.

Step-by-step:

  1. Back up via Settings โ†’ Additional โ†’ Backup and Reset (or use Mi Mover).
  2. Go to Settings โ†’ About the phone โ†’ Reset settings.
  3. Select โ€œErase all dataโ€ โ†’ enter a password (if any) โ†’ confirm.
  4. After the reboot, follow the instructions of the setup wizard.

Alternative method via Recovery (if the phone is not turned on):

  • ๐Ÿ”Œ Turn off the device.
  • ๐Ÿ”˜ Hold the Power. + Volume Up before the Mi logo appears.
  • ๐Ÿ“› Choose Wipe Data โ†’ Wipe All Data โ†’ confirm.

After discharge:

  • โœ… Do not restore data from the backup right away โ€“ first check how much memory is free.
  • โœ… Install only the necessary applications (avoid junk utilities like memory cleaners).
  • โœ… Turn off auto-update apps on Google Play.

๐Ÿ’ก

Factory reset is the only way to remove system update files (OTAs) that can take up to 5GB and donโ€™t show up in standard memory analysis.

6 How to prevent rapid memory filling in the future

To avoid clearing your memory every few months, set up Xiaomi correctly:

Problem.DecisionSaving memory
Cash Google Play ServicesLimit background activity in Settings โ†’ Apps โ†’ Google Play Services โ†’ Batteryup to 1.5 GB/month
Auto downloading media in messengersIn WhatsApp/Telegram, turn off autoloading photos/video in Settings โ†’ Storageup to 3 GB/month
Logs and dumps of the systemTurn off log collection in ##4636## โ†’ Loggingup to 500MB/week
MIUI updatesRemove old service packs in Settings โ†’ About Phone โ†’ System Update โ†’ Three Dots โ†’ Delete downloaded packages4GB

Additional advice:

  • ๐Ÿ“ฑ Use cloud services (Mi Cloud, Google Drive) to automatically upload photos/video.
  • ๐Ÿ”„ Check the Downloads folder regularly โ€“ unnecessary ones accumulate here. APK documents.
  • ๐Ÿ›ก๏ธ Install. SD Maid (root required) for automatic cleaning of garbage on schedule.
What if the memory ends immediately after resetting?
If the memory is quickly filled up after hard reset, the problem may be: 1. damaged partition /data (remarking through Fastboot is required). 2. A virus masquerading as a system application (check through Malwarebytes). 3. Drive defect (diagnosed through adb shell dumpsys diskstats).

FAQ: Frequent questions about Xiaomi memory cleanup

Can I clean my memory without losing data?
Yes, if you're cached, duplicate photos, or temporary files, but system debris (such as update residues) and some folders (/data/app) can only be deleted through a root-righted reset or ADB. Always back up before deep cleaning.
Why does memory run out quickly after cleaning?
Causes: ๐Ÿ”„ Auto-Update Apps (turn off Google Play). ๐Ÿ“ธ Sync photos in original quality (switch to โ€œHigh Qualityโ€ in Google Photos). ๐Ÿ—‘๏ธ System Logs (disable in #4636##). ๐Ÿฆ  Viruses or Advertising Software (check out Malwarebytes).
How to clean up memory on Xiaomi with unlocked bootloader?
If you have a bootloader unlocked, use these commands through ADB: adb shell su Deleting Dalvik cache (accelerates the system) rm -rf /data/dalvik-cache/* Cleaning temporary rm files -rf /data/local/tmp/* rm -rf /data/log/* Removal of old OTA-packet -rf /cache/ota/* Note: Do not delete files from /system or /vendor โ€” This will lead to a brick (breakdown) of the device.
How much memory should be free for normal operation?
Minimum recommendations: ๐Ÿ“ฑ 1-2 GB โ€“ for basic work (calls, messengers). ๐ŸŽฎ 3-5 GB - for games (Genshin Impact, Call of Duty Mobile). ๐Ÿ“ธ 5-10 GB โ€“ if you are actively shooting videos in 4K or 8K. If it's less free 500 MB, the system will begin to forcibly close applications and slow down.
Can I transfer applications to a memory card?
In most modern Xiaomi (C) MIUI 12+) porting applications to microSD is blocked by default. bypass: Use ADB: adb shell pm set-install-location 2 (this will allow you to install new applications on the map). App2SD (Format the card as internal memory (Settings) โ†’ Memory. โ†’ Map. SD โ†’ Set it up as internal, but it'll slow it down: โŒ System applications cannot be moved. โŒ Some games, for example, PUBG Mobile does not work with the card.