How to completely remove the cache of the gallery on Xiaomi: instructions for all models

The cache of the galleries on Xiaomi, Redmi and POCO smartphones is one of the most insidious folders, which quietly takes up gigabytes of memory. Even after deleting photos through the Gallery or Google Photos app, their thumbnails, previews and service files continue to be stored in the system, not only eating up precious space, but can cause the phone to slow down, errors when opening images or even crashes in other applications.

Complicating the problem is that standard cleaning methods (via application settings or file manager) often remove only part of the garbage. In this article, we will discuss 5 proven ways to completely clear the cache of the gallery on Xiaomi - from basic to advanced, including hidden system folders and commands for ADB. Particular attention will be paid to models with MIUI 14/15 and HyperOS, where the logic of cache storage has changed.

Important: Some methods require a superuser or PC connection, and if you're a beginner, start with the first three, they're safe and don't require technical skills.

1. Standard cache cleaning through application settings

The simplest and most secure method that works on all Xiaomi models without additional tools is suitable for users who do not want to go deep into system files.

Steps:

  • πŸ“± Open your phone settings and go to the App section β†’ Application management.
  • πŸ” In the search box, type "Gallery" (or "Google Photos" if you use this application).
  • 🧹 Click on the app, then select Storage β†’ Clear the cache.
  • πŸ—‘οΈ For a complete cleanup, click also Clear Data (this will remove the app settings, but not the photos themselves).

⚠️ Attention: On some firmware MIUI The "Clear Cache" button may be inactive, which means that the system is blocking manual cleaning for the application.

β˜‘οΈ What to do if the β€œClear Cache” button does not work?

Done: 0 / 4

This method only removes the surface cache, thumbnails and temporary files, and deep system folders with previews (.thumbdata) remain intact, and we will discuss cleaning them later.

2. Manually clean folders with cache through file manager

MIUI stores the gallery cache in several hidden folders, which can be manually deleted, but this will require a file manager with access to system partitions (for example, MiXplorer or Solid Explorer with Root mode enabled).

Where to look for garbage:

  • πŸ“ /storage/emulated/0/DCIM/.thumbnails β€” thumb-up.
  • πŸ“ /storage/emulated/0/Pictures/.thumbnails β€” alternative location for some models.
  • πŸ“ /data/data/com.miui.gallery/cache β€” System Gallery cache (requires root).
  • πŸ“ /data/data/com.google.android.apps.photos/cache β€” Google's cache.

πŸ’‘

If you don’t see the.thumbnails folder, turn on the hidden files in the file manager settings (usually in the View or Settings menu).

Instructions:

  1. Open the file manager and follow one of the paths above.
  2. Select all files in the folder (usually files with the.thumbdata3 extension,.thumbdata4 extension, or just a set of digits).
  3. Delete them. If the folder doesn't delete, reboot the phone and try again.

πŸ”Ή Note: On Xiaomi with HyperOS (2026 year) cache folders may have other names, e.g. /storage/emulated/0/Android/data/com.miui.gallery/files/thumb. If the standard paths didn’t work, use the thumb keyword search in the file manager.

3. Cleaning through Recovery Modes

If the phone is slowing down because of a crowded cache, and standard methods do not help, you can use Recovery Mode. This method does not require root, but resets some settings.

Steps:

  1. Turn off the phone.
  2. Press the button combination: πŸ”˜ For most models: Nutrition + Loudness up. πŸ”˜ For POCO F5, Xiaomi 13/14: Nutrition + Loudness up + Loudness down (hold) 10 seconds).

Recovery

Wipe & Reset β†’ Wipe Cache

Confirm the action and wait for the completion.

Reboot β†’ System

⚠️ Warning: Don't confuse Wipe Cache with Wipe Data! The second option will completely reset the phone to factory settings, deleting all your data. Also avoid Format Data - this will lead to loss of photos.

πŸ“Š How often do you clean your Xiaomi cache?
Once a week.
Once a month
Only when the phone starts to brake
Never cleaned.

4.Use ADB for deep cleaning (no root)

If previous methods didn’t work and root rights didn’t, you can use Android Debug Bridge (ADB), which removes the cache at the system level, but requires a connection to a PC.

What you need:

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

Cleanup commands:

adb shell pm clear com.miui.gallery # Clearing the data and cache of the standard gallery


adb shell pm clear com.google.android.apps.photos # Google Cleanup Photo




adb shell rm -rf /storage/emulated/0/DCIM/.thumbnails/* # Removal of thumbnails

πŸ”Ή Important: After completing the commands, restart the phone. If rm fails for -rf, So you don’t have the right to delete – try the root method. 5).

5. Complete root-right cleaning (for advanced)

If you have root access, you can delete all traces of the gallery cache, including system folders that are not available in the usual way.This method is risky - improper actions can cause the Gallery application to crash.

Instructions:

  1. Install a file manager with root support (such as Root Explorer or FX File Explorer).
  2. Go to /data/data/com.miui.gallery – delete all content except lib. /data/media/0/DCIM/.thumbnails – delete completely. /data/media/0/Pictures/.thumbnails – delete completely.

Reboot the phone.

Critical information: Some HyperOS firmware folders /data/data/com.miui.gallery may contain files miui_gallery_prefs.xml β€” Deleting them will reset all the gallery settings (albums, favorites, sorting). If you care about this data, back up the file before cleaning it.

What if the gallery stopped working after cleaning?
If after deleting the system files, the Gallery application gives an error, try: 1. Clear the application data through Settings β†’ Apps. 2. Reinstall the Gallery update via Google Play (if available). 3. Reset the app settings to factory settings in Recovery (Wipe Dalvik Cache). If nothing helps, you will have to reflash the phone or restore deleted files through deleted files through Recovery (Wipe Dalvik Cache). TWRP-backup.

MethodDifficultyRoot is required.Removing.Risks.
Through the application settings⭐❌ No.Surface cacheNo.
Hand-cleaning folders⭐⭐❌ No (but you need a file manager)Miniatures,.thumbdataImportant files can be accidentally deleted
Recovery Mode⭐⭐❌ No.System cache (not all folders)Resetting some settings
ADB⭐⭐⭐❌ No.App cache, thumbnails.Mistakes with the wrong commands
Root-cleaningβ­β­β­β­βœ… Yes.Everything, including system filesHigh (risk of breaking gallery)

πŸ’‘ Tip: If you regularly encounter cache overflow, install the app SD Maid or Files by Google – they automatically find and suggest you delete unnecessary files, including leftovers from the gallery.

How to prevent re-accumulation of cache

Cleaning the cache is a temporary solution, so that the problem does not return, follow these recommendations:

  • πŸ”„ Regularly (once every 1-2 weeks) clear the cache of the gallery through the settings of the application.
  • πŸ“ Use cloud services (Google Photos, Mi Cloud) to store original photos, and leave only previews on your phone.
  • 🚫 Turn off automatic miniature creation in the gallery settings (if such option is available).
  • πŸ“± Install a memory monitoring app, such as Storage Analyzer, to track the growth of.thumbnails folders.

⚠️ Note: Xiaomi with HyperOS (2026) has a function β€œSmart cleaning” (Settings) β†’ Memory. β†’ It automatically deletes unwanted cache, but sometimes it also mishandles useful data.

πŸ’‘

The safest way is to combine a standard cache cleaner (Section 1) and manually remove.thumbnails folders (Section 2) that removes 90% of the garbage without risk to the system.

Frequent Questions (FAQ)

❓ Why After Cleaning the Cache, Gallery Creates.thumbnails Folders Again?
This is normal Android behavior..thumbnails folders are automatically recreated when you view photos, but their size will be minimal until you open many images in a row. To reduce their growth, avoid scrolling through the entire gallery at a time - the system caches previews only for the photos viewed.
❓ Can I delete the cache of the gallery without losing photos?
Yes, all of the methods described delete only temporary files (miniatures, previews, service data) Your original photos and videos remain intact as they are stored in the DCIM or Pictures folders. However, if you use the Clear Data option in the application settings, sorting settings and albums can be reset.
❓ Why Xiaomi 13 Pro Gallery Cache Takes 10+ GB?
On flagship models (Xiaomi 13/14, POCO F5 Pro), the system caches not only thumbnails, but also full-size previews for quick, high-resolution opening. In addition, HyperOS can duplicate cache for AI functions (e.g., image search). Solution: Clear cache through ADB (section 4). Disable Smart Photo Search in gallery settings. Use a third-party gallery (e.g., Simple Gallery) that does not create such a volumetric cache.
❓ How to Recover Deleted Photos If I Accidentally Cleared the Wrong Folder?
If you delete not the cache, but the original photos (folders) DCIM Or Pictures, try it: πŸ” Recovery software: DiskDigger, Recuva (requires PC connection). ☁️ Check cloud backups: Google Photos, Mi Cloud, Yandex.Disk. πŸ“± If the phone is rooted, use it. TWRP and backup section /data. ⚠️ The chances of recovery depend on how much data was written to the phone after deleting, and the faster you start recovery, the more likely you are to succeed.
❓ Why the gallery has become slower after upgrading to HyperOS?
HyperOS uses a new caching mechanism optimized for AI functions (facial recognition, content search).This can cause delays when you first open a gallery after cleaning the cache. Solutions: Wait for the system to rebuild the cache (usually takes 5-10 minutes); disable Photo Analysis in the gallery settings; install an alternative gallery (such as Aves Gallery), which is independent of the system cache.