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?
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:
- Open the file manager and follow one of the paths above.
- Select all files in the folder (usually files with the.thumbdata3 extension,.thumbdata4 extension, or just a set of digits).
- 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:
- Turn off the phone.
- 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.
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:
- Install a file manager with root support (such as Root Explorer or FX File Explorer).
- 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?
Comparison of Gallery Cache Cleaning Methods
| Method | Difficulty | Root is required. | Removing. | Risks. |
|---|---|---|---|---|
| Through the application settings | β | β No. | Surface cache | No. |
| Hand-cleaning folders | ββ | β No (but you need a file manager) | Miniatures,.thumbdata | Important 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 files | High (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.