How to completely clean memory on Xiaomi 9: from cache to system files

Xiaomi 9 even a few years after the release remains a popular smartphone, but its 64 or 128 GB of memory have the unpleasant property of filling up with โ€œnothing is knownโ€. Photos, instant messengers, app updates and system debris eat up precious gigabytes, and the user suddenly sees a notification: โ€œMemory is full.โ€ In this article, we will analyze all possible ways to clean up memory โ€“ from safe (cache removal) to radical (reset to factory settings), and also tell you how to avoid repeated memory clogging due to hidden functions. MIUI.

It's important to understand that just deleting files through Gallery or Files is not enough. The main memory eaters are hiding in system folders, app cache and duplicate media files. We analyzed user reports and tests on Xiaomi 9 (codenamed cepheus) and identified 5 key methods that have the maximum effect.

1. Diagnostics: what exactly takes up memory on Xiaomi 9

Before you clean, you need to understand which files are taking up space. MIUI There's a built-in memory analyzer, but it often shows data inaccurately:

  1. Through Settings: Go to Settings โ†’ The phone. โ†’ Memory. This shows categories like "Applications," "Images," "Video," etc. Click on each to see the details.
  2. Files: Open the Files app (folder icon), go to Analysis, and you can see the file types, including the hidden ones.
  3. Third-party tools: install DiskUsage or Files by Google from the Play Market, which will show the exact size of folders, including system folders (for example, the file size, /data/app or /Android/obb).

Typical โ€œculpritsโ€ of memory clogging on Xiaomi 9:

  • ๐Ÿ“ธ Duplicates of photo / video (created when editing in the Gallery or automatic backup).
  • ๐ŸŽฎ Cash games (daddy) /Android/obb weigh 10+ GB).
  • ๐Ÿ—‘๏ธ Messaging garbage (Telegram, WhatsApp download media in the background).
  • ๐Ÿ”„ Remnants of Remote Applications (Folders) /data/data They are not always completely cleaned).
  • ๐Ÿ“ฑ System dumps (.dmp or.log files in) /sdcard/MIUI/debug_log).

If the System section is more than 15 to 20 GB, that's a cause for concern, perhaps temporary update files or faulty logs have accumulated, and deleting them requires super-user rights, but more on that later.

๐Ÿ“Š What is most often clogged memory of your Xiaomi?
Photos and videos
Applications and their cache
Games (OBB, data)
Messenger garbage
I don't know what's taking up the place.

2. Cleaning up app cache and system debris

The safest and fastest way to free up 1 to 5 GB is to remove the cache. Cache speeds up applications, but grows into uncontrollable sizes over time. On Xiaomi 9, it can be cleaned in three ways:

Manual cleaning of cache for individual applications

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Select an app (such as YouTube or Facebook).
  3. Press Warehouse. โ†’ Clear the cache.

For games (e.g, PUBG Mobile or Genshin Impact cache can weigh several gigabytes. Delete it only if the game starts to slow down, otherwise it will download data again the next time it runs.

Mass cleaning of cache of all applications

To avoid cleaning each application individually:

  1. Go to Settings โ†’ Memory โ†’ Cleanup.
  2. Click Clear Cache (usually frees 500MB-2GB).
  3. For deep cleaning, choose Deep cleaning (remove unnecessary ones). APK, post-expenditure).

Close all active applications

Connect charging (the process can take 5-10 minutes)

Check the free space before and after cleaning.

Do not clear the cache of system applications (e.g. com.android.systemui)

-->

Cleaning of garbage through โ€œSafetyโ€

V MIUI There is a built-in security tool (shield icon):

  1. Open the Security app.
  2. Go to the Cleanup section.
  3. Press the check and wait for the analysis.
  4. Select the categories to clean (we recommend marking everything except Download).

This method removes:

  • ๐Ÿ—‘๏ธ Temporary files (.tmp,.temp).
  • ๐Ÿ“ Empty folders.
  • ๐Ÿ” Remains of the remote APK.
  • ๐Ÿ“‹ Logs of system errors.

โš ๏ธ Note: Do not clear the cache of com.miui.home and com.android.phone applications โ€“ this can lead to interface failures or network loss.

3. Delete unnecessary files and duplicates

Even if you regularly delete photos from the Gallery, the Xiaomi 9 still has:

  • ๐Ÿ“ธ Hidden folders (.thumbnails, DCIM/.thumbs).
  • ๐ŸŽฅ Videos in low resolution (created when sent via messengers).
  • ๐Ÿ“„ Duplicate documents (e.g. screenshots with the same content).

To find and remove them:

3.1. Search for duplicates through the "Files"

  1. Open the Files app.
  2. Go to the Analysis section โ†’ Duplicate.
  3. Select unnecessary copies and click Delete.

Manual cleaning of hidden folders

Use a file manager with access to hidden files (such as Solid Explorer or Solid Explorer) FX File Explorer):

/sdcard/DCIM/.thumbnails โ€“ photo miniatures (can be deleted)


/sdcard/MIUI/debug_log - Error Logs (Delete)




/sdcard/Android/obb โ€“ cache of games (delete if games are not used)




/sdcard/Download โ€“ Old downloads (check and clear)

Cleaning of messengers

Telegram, WhatsApp and Viber automatically download media files to make room:

  • ๐Ÿ“ฅ In Telegram: Settings โ†’ Data and memory โ†’ Clear the cache.
  • ๐Ÿ’ฌ On WhatsApp: Settings โ†’ Warehouse โ†’ Storage management (sorting by size).
  • ๐ŸŽต In Viber: Settings โ†’ Media โ†’ Clear media files.

๐Ÿ’ก

In Telegram, turn off autoload media: Settings โ†’ Data and memory โ†’ Autoboot media โ†’ Select Never, and this will prevent the photo/video from automatically downloading in the background.

4. Transfer data to a memory card or cloud

If the internal memory is full and you donโ€™t want to delete anything, transfer the files to an external medium. Xiaomi 9 supports microSD up to 256 GB (in a hybrid slot), as well as cloud services.

Transfer of annexes to SD-map

Not all apps support portability, but itโ€™s worth trying:

  1. Go to Settings โ†’ Applications โ†’ Application Management.
  2. Select an app (such as Spotify or Google Maps).
  3. Click Warehouse โ†’ Change โ†’ Memory Map.

Limitations:

  • โŒ System applications cannot be moved.
  • โŒ Some games (such as Call of Duty Mobile) block the transfer.
  • โš ๏ธ After the transfer, the application may work slower.

4.2 Use of the memory card as internal storage

Adoptable Storage allows you to combine microSD with internal memory.

  1. Put the memory card in.
  2. When a notification appears, select Use as internal storage.
  3. Follow the instructions (the map will be formatted!).

โš ๏ธ Note: After that, the card cannot be retrieved without losing data, and it will also run slower than the internal memory (especially if the class is not the same). SDHC Class 10 or lower).

Automatic booting to the cloud

Set up automatic backup of photos and videos:

  • ๐ŸŒฅ๏ธ Google Photos: Settings โ†’ Backup and synchronization (free up to 15 GB).
  • ๐ŸŒ Mi Cloud: Settings โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Gallery (5GB free).
  • ๐Ÿ“ฆ Yandex Disk: Settings โ†’ Autoboot (10GB for free).
ServiceFree seatAutoloading photoFile compression
Google Photo15GBYes.Yes (Quality High)
Mi Cloud5GBYes.No.
Yandex Disc.10GBYes.Yes (optional)
Dropbox2GBYes.No.

5. Radical methods: reset to factory settings

If nothing works, and if there's not enough space, you'll have to reset completely, and that will remove everything, including:

  • ๐Ÿ“ฑ Annexes and their data.
  • ๐Ÿ“ธ Photos, videos, music (if not saved in the cloud).
  • ๐Ÿ“‹ System settings (Wi-Fi, wallpaper, accounts).

How to do the reset correctly:

  1. Save important data: copy your photos to your PC or cloud, export your contacts (Contacts) โ†’ Settings โ†’ Exports).
  2. Disable your Xiaomi account (Settings) โ†’ Xiaomi account โ†’ Get out).
  3. Go to Settings โ†’ About Phone โ†’ Resetting โ†’ Erase all data.
  4. Confirm the action (you will need to enter a pattern lock or PIN).

After discharge:

  • ๐Ÿ”„ The phone will reboot and return to the โ€œout of the boxโ€ stateยป.
  • ๐Ÿ“ฑ When first switched on, follow the instructions of the setup wizard.
  • ๐Ÿ”’ Do not restore backup from Mi Cloud if it is old โ€“ it will bring back the garbage.
What if the memory is filled up quickly after reset?
This means that the problem is system processes or corrupted firmware. Possible causes: 1. Failure of the file system (flashing through Fastboot will help). 2. Virus or malware (check with antivirus after reset). 3. Automatic data download (turn off sync in Google Account and Mi Cloud). If the problem recurs, contact the service center for memory diagnostics (possibly, wear of the flash drive).

โš ๏ธ Note: On Xiaomi 9 with unlocked bootloader, a reset can result in a device lock (Anti-Rollback). โ†’ The phone. โ†’ Version. MIUI (Press 7 times on "Coreยป).

6.Prevention: How to prevent memory clogging

To avoid cleaning up your memory every week, set up the Xiaomi 9 correctly:

6.1. disable automatic media downloading

Messengers and social media are the main memory eaters.

  • ๐Ÿ“ธ Instagram: Settings โ†’ Account. โ†’ Multimedia settings โ†’ Save the originals (disable).
  • ๐Ÿ’ฌ VK: Settings โ†’ General. โ†’ Save media files (disable).
  • ๐ŸŽต TickTok: Settings โ†’ Data and memory โ†’ Cash (clean once a week).

6.2. Cache restriction for individual applications

Some apps (like Google Play Services or Facebook) can take up gigabytes of cache.

  1. Go to Settings โ†’ Applications โ†’ Application Management.
  2. Select the application โ†’ Warehouse.
  3. Click Cache Limit (if the option is available).

Set-up of automatic cleaning

V MIUI There is an automatic cleaning function:

  1. Open Security. โ†’ Cleanup.
  2. Activate Auto Cleanup.
  3. Select the frequency (we recommend weekly).

๐Ÿ’ก

Regularly cleaning the cache and disabling autoload media can save up to 30% of memory on Xiaomi 9 without deleting important files.

7. Advanced methods (for experienced users)

If the standard methods don't work, and the memory is still filled with "nothing you know what," it's time to use advanced tools that require superuser rights or work with the user. ADB.

7.1 Cleaning through ADB (rootless)

With help. ADB You can remove system debris that is not available through the interface:

  1. Install ADB on PC (instruction: official website).
  2. Connect Xiaomi 9 to USB And turn on the debugging. USB (Settings โ†’ The phone. โ†’ Version. MIUI โ†’ Press 7 times, then return to Additional โ†’ For developers).
  3. Follow the commands: adb shell pm clear com.miui.cleanmaster MIUI adb shell rm -rf /sdcard/MIUI/debug_log โ€” deletion of adb shell rm logs -rf /sdcard/Download/*.Apk โ€“ Removing old ones APK

7.2. Remove unnecessary system applications (root required)

Many pre-installed apps (Mi Video, Mi Music, Browser) cannot be removed without root.

  1. Install Root Explorer or Titanium Backup.
  2. Go to /system/app or /system/priv-app.
  3. Remove folders of unnecessary applications (for example, MiuiVideo, MiuiBrowser).

List of safe to remove system applications:

  • ๐ŸŽฌ com.miui.video - standard video player.
  • ๐ŸŽต com.miui.player - Music player.
  • ๐ŸŒ com.android.browser โ€“ the standard browser.
  • ๐Ÿ“– com.miui.notes โ€“ notes (if not used).

โš ๏ธ Warning: Removing system applications may cause malfunctions MIUI. Before deleting, create a backup copy through TWRP Or OrangeFox Recovery.

7.3. Optimization of the file system

Over time, the file system F2FS (Xiaomi 9 is fragmented, which slows down and increases the space occupied:

  1. Install SD Maid (root required).
  2. Launch SystemCleaner โ†’ CorpseFinder (will delete the remnants of deleted files).
  3. Run Defrag (if available for your file system).

FAQ: Frequent questions about Xiaomi memory cleaning 9

Can Xiaomi 9 memory be cleaned without data loss?
Yes, if you use the methods in sections 2 and 3 (cache cleaning, duplicate deletion, file transfer) resetting to factory settings (section 5) will delete everything, so it should only be used as a last resort.
Why does the memory fill up quickly after cleaning?
Probable causes: ๐Ÿ”„ Automatic download of media in messengers (turn off in settings). ๐Ÿ“ฑ App Updates (check Play Market) โ†’ Settings โ†’ Auto-update). ๐Ÿ—‘๏ธ System Logs or Dumps (check folder) /sdcard/MIUI/debug_log). ๐Ÿ› ๏ธ Failure of the file system (will help flashing).
How to clear your memory if your phone is not switched on?
If Xiaomi 9 doesnโ€™t boot but reacts to a PC connection: Connect your phone to your computer in Fastboot mode (clip Power). + Volume down when turned on. Use the Mi Flash Tool to flash it back (instructions on the official website). If the phone is recognized as a removable drive, copy important files through Windows Explorer. If the phone does not respond at all, contact the service center.
What files can be safely deleted from Xiaomi 9?
List of safe for deleting files and folders: /sdcard/Download/ โ€” download (check before deleting) /sdcard/DCIM/.thumbnails โ€” photo-picture /sdcard/MIUI/debug_log โ€” mistake /sdcard/Android/obb/ โ€” cache of games (if the games are not used) /sdcard/Bluetooth/ โ€” Bluetooth temporary files /sdcard/Pictures/Screenshots โ€” Screenshots (if not necessary) Do not delete: /sdcard/Android/data/ โ€” Application data (may break their work) /sdcard/MIUI/ โ€” System files (except for debug_log) /sdcard/Alarms/ โ€” alarm-file
Does flashing help with custom firmware (like LineageOS)?
Yes, but with reservations: โœ… Pros: Castom firmware (like LineageOS or Pixel Experience) doesnโ€™t contain pre-installed garbage MIUI. โŒ Cons: Requires unlocking the bootloader (resets all data). Some functions (e.g., some functions) may not work, IR Blaster or Always-on Display. There is no official support (you have to install it manually) If you decide, use the firmware from the XDA-Developers forum for cepheus.