How to Clean Memory on Xiaomi Mi 8: From Cache to Hidden Files

Why Xiaomi Mi 8 is fast filling memory and how to fix it

Owners of Xiaomi Mi 8 often face a problem: the smartphone suddenly gives a notification β€œMemory is full”, although you seemingly did not install anything superfluous. It is not only your photos and applications that are to blame, but also the system processes of MIUI that actively cache data. For example, the standard Mi Browser browser can β€œeat” up to 1-2 GB on temporary files, and Gallery duplicates thumbnails of photos in hidden folders.

Another common reason is automatic backup to Mi Cloud, which is enabled by default. Even if you didn't use the cloud, the system could upload gigabytes of data there without your knowledge. Besides, the Xiaomi Mi 8 (especially on firmware older than MIUI 12) suffers from a bug with junk folders.thumbnails and.data that are not cleaned by standard means. They have to be manually deleted - but how?

In this article, we will discuss 7 proven ways to clean up memory, from basic (delete the cache of applications) to advanced (work with ADB and hidden partitions), and find out why memory is refilled after a week, and how to avoid this.

Method 1: Clearing the application cache through MIUI settings

The easiest method is to delete temporary files (cache) for all or individual applications. This will not delete your data (for example, save in games or correspondence in messengers), but will free up from 100 MB to 1-2 GB of memory.

How to do this:

  1. Open Settings β†’ Applications β†’ Application Management.
  2. Slip on the three dots in the upper right corner and select Sort by size.
  3. Scroll down the list, and you'll find the most voracious programs at the top. Click on any application.
  4. Select Warehouse. β†’ Clear the cache.

For mass cleaning:

  1. In the same Application Management menu, click on the basket icon in the upper right corner.
  2. Check the unneeded apps (or all) and tap Clear the cache.

⚠️ Note: Do not clear the cache for Google Play Services, Mi Account, and Security – this may cause disruptions to Google services and security systems MIUI.

βœ… Social networks (Facebook, Instagram, VK)

βœ… Messengers (Telegram, WhatsApp) – but do not delete media files!)

βœ… Browser (Chrome, Mi Browser)

βœ… Games (cache of textures and updates)

❌ System applications (Settings, Phone, Contacts)

-->

Method 2: Removing garbage through Security App

MIUI has a built-in cleaning tool called Security (or Security in English) that finds residual files, duplicates and unnecessary data better than manual cleaning.

Instructions:

  1. Open the Security app (the shield icon).
  2. Go to the Cleaner (or Cleaner) tab.
  3. Press the check and wait for the scan to be completed.
  4. Check all categories (Junk files, Cash, Big files) and tap Clear.

Please note the section Deep Cleaning – you can delete:

  • πŸ—‘οΈ Residual files after deleting applications (lib, cache folders) /data/data).
  • πŸ“ Empty folders that remain after file transfer.
  • πŸ” Log files (system error logs).

⚠️ If after cleaning through Security, the memory was freed up by less than 500 MB, then the garbage accumulated in hidden sections - they can not be seen without Root or other devices. ADB. Go to method 5.

Once a week.

Once a month

Only when memory ends

Never cleaned.

-->

Method 3: Removing duplicate photos and videos

Xiaomi Mi 8 has a nasty feature: the Gallery app creates duplicate thumbnails and previews to speed up viewing. These files are stored in.thumbnails folders and can take up to 3-5 GB.

How to find and remove duplicates:

  1. Connect your phone to your PC via USB (in File Transfer mode).
  2. Open internal memory and find folders: DCIM/.thumbnails Pictures/.thumbnails MIUI/Gallery/cloud/thumb (if you used the cloud)

Gallery

To find duplicates of the photos / videos themselves (not thumbnails), use the applications:

  • πŸ“± Files by Google (Cleanup tab) β†’ Duplicate).
  • πŸ“± CCleaner (Section Analysis of Storage).

πŸ’‘

Before removing duplicates, back up your photo on your PC or to the cloud. Sometimes Gallery mistakenly labels duplicate files with different resolutions (such as the original and the edited version).

Type of fileWhere to findHow much space does it take?
Miniatures (.thumbnails)DCIM/.thumbnails, Pictures/.thumbnails1-5 GB
Cash GalleryAndroid/data/com.miui.gallery500 MB - 1 GB
Duplicate photosCamera folders, ScreenshotsDepends on the amount.
Logs of system errors/data/log (Root required)100-300 MB

Method 4: Transfer applications to memory card (if supported)

The Xiaomi Mi 8 does not support microSD expansion as standard, but some modifications (such as the Mi 8 SE or third-party firmware) allow you to use the card as internal storage. If your smartphone supports this feature, porting apps will help free up 3-10 GB.

How to move applications:

  1. Insert microSD (UHS-I U3 class is recommended for speed).
  2. Go to Settings β†’ Storage β†’ SD card.
  3. Select Set up as internal storage (Warning: the map will be formatted!).
  4. After formatting, go to Settings β†’ Apps, select the program and click Transfer to SD-map.

⚠️ Note: Not all applications can be ported – many (especially system) remain in internal memory, and applications may be slower after porting, as microSD reads faster than internal memory. UFS 2.1.

What happens if you remove the memory card after transferring the applications?
If you remove the microSD, the transferred applications will stop working until you re-insert the card, and the system will not delete them, but the icons will disappear from the desktop, and when you try to open, you will see an error "Application not installed." To return everything back, insert the card again and transfer the applications to internal memory manually.

Method 5: Clean Hidden Folders with ADB (without Root)

If standard methods don't work and the memory is still full, the problem is hidden system folders that can't be seen through the conductor, which can be cleaned without Root rights using the Android Debug Bridge (ADB).

What will be required:

  • πŸ–₯️ A computer with installed Xiaomi drivers and ADB (You can download from the official Android website).
  • πŸ“± Included debugging by USB on the phone (Settings) β†’ The phone. β†’ Version. MIUI β€” Tap 7 times, then return to the additional β†’ For developers β†’ Debugging by USB).

Cleanup commands:

adb shell pm clear com.miui.gallery #Cleaning up Gallery's cache


adb shell rm -rf /data/local/tmp/* # Delete temporary files




adb shell rm -rf /data/log/* # Log cleanup (requires Root on some firmware)




adb shell pm trim-caches 500M # Forced cache clearing for all applications

If you need a deeper cleanup (such as removing residues from remote applications), use:

adb shell pm list packages -u | grep 'uninstalled' # Shows 'junk' packages


adb shell pm uninstall -k --user 0 com.example.app # Removes residues (replace com.example.app in the packet name)

πŸ’‘

Cleaning through ADB is the only way to delete files from /data/local/tmp and /data/log folders without Root-rights. These folders are often clogged with system error logs and temporary update files that are not deleted automatically.

Method 6: Reset to factory settings (last chance)

If none of the methods worked, and there is less than 1 GB of free memory, you will have to do a hard reset, which will delete all data, including apps, photos and settings, but return the smartphone to a β€œclean” state.

How to reset the Xiaomi Mi 8:

  1. Back up important data (contacts, photos, messages) through Mi Cloud or Google Account.
  2. Go to Settings β†’ About the phone β†’ Reset settings.
  3. Choose to erase all data and confirm the action.
  4. After the reboot, the phone will be like new – it will only be necessary to restore data from the backup.

⚠️ Note: Some firmware may not unlock the bootloader after reset. If you previously unlocked it to install custom firmware, you will need to repeat the unlock procedure through the Mi Unlock Tool after hard reset.

Method 7: Optimize MIUI to prevent memory filling

To prevent memory from filling up so quickly, set up MIUI according to these rules:

  • πŸ“΅ Turn off automatic backup: Settings β†’ Accounts. β†’ Mi Cloud β†’ Backup. Disable all items (especially Gallery and Notes).
  • πŸ”„ Limit cache for individual applications: C Settings β†’ Select the application (e.g. Chrome) and click Storage β†’ Limit cache (if option is available).

Set up a car cleanup.

  1. In the app Security β†’ Cleaning β†’ Settings.
  2. Turn on Auto Clean when you lock the screen.

Solution: Turn off autosynchronization and limit cache for β€œgluttonous” applications (see Method 7).

How do I know which files occupy the most space?
Use the applications Files by Google (Storage Analysis tab), DiskUsage (showing memory usage by folder), SD Maid (scanning hidden files, requiring Root for full access), you can also connect your phone to your PC and use WinDirStat for visual analysis.
What if a β€œPermission denied” error occurs when cleaning through ADB?
This error means that you do not have the right to delete files in system folders. Solutions: Get Root rights (for example, through Magisk). Use alternative commands that do not require Root: adb shell pm clear # Clear the cache of a particular application Update firmware - in new versions of MIUI some restrictions are removed.
Can you increase the memory of Xiaomi Mi 8 with the help of OTG-flash-drive?
Technically yes, but with reservations: πŸ”Œ Connect. OTG-flash-drive adapter (format) FAT32 exFAT). πŸ“ Transfer media files (photos, videos, music) manually to the flash drive. ❌ Applications cannot be moved β€” MIUI does not support the installation of programs on external drives through OTG. For permanent use, it is better to buy a microSD card and a microSD adapter. β†’ USB-C, But it won't solve the memory problem for apps.