The gallery on Xiaomi smartphones is not just a place to store photos, but a real black box that over time gets clogged with duplicates, app cache and hidden files. Even if you regularly delete unnecessary pictures, the system continues to take up gigabytes of memory due to temporary data, thumbnails and utility files from MIUI. As a result, the phone begins to slow down, and the notification βMemory is fullβ appears at the most inopportune moment.
In this article, we will discuss 5 proven ways to clean the gallery, from basic (hand-deleting photos) to advanced (clearing cache through ADB and hidden folders). Particular attention will be paid to the unique features of MIUI 14/15, which allow you to automate the process and avoid losing important files. If your Redmi Note 12 or POCO X5 already signals a memory shortage, this guide will help free up to 30% of space without installing third-party applications.
Why is the gallery on Xiaomi clogged quickly?
The problem is not the number of photos taken, but the MIUI architecture, which creates up to 7 types of duplicates for a single photo:
- πΈ Originals (daddy) DCIM/Camera)
- πΌοΈ Miniatures (folder.thumbnails, weighs up to 1 GB)
- π Cash galleries (daddy) Android/media/com.miui.gallery/cache)
- π Backups (if Mi Cloud is enabled)
- π€ Service files from apps (such as WhatsApp or Telegram)
- π Search files (galleries index, weighs up to 500 MB)
- π± Duplicates from the cloud (if Google Photos and Mi Cloud are synced)
In addition, Xiaomi defaults to save screenshots in the Pictures/Screenshots folder, and files from messengers in Download or Android/media/com.whatsapp/WhatsApp Media. Even after deleting the photo from the gallery, these files can remain in the memory of the phone!
β οΈ Note: If you use Google Photos in the βOriginal Qualityβ mode, all photos removed from the gallery remain in the cloud and continue to take up space on the device through the app cache. To completely remove them, you need to clear the shopping cart in Google Photos and the app cache in the Xiaomi settings.
| Type of file | Where they're stored | Average weight | Can I remove it? |
|---|---|---|---|
| Original photo | DCIM/Camera | 5-15 MB in photo | Yes (by hand or through the gallery) |
| Miniatures. | .thumbnails | 200 MB - 1 GB | Yeah (safe) |
| Cash galleries | Android/media/com.miui.gallery | 100-500 MB | Yes (automatically regenerates) |
| Screenshots | Pictures/Screenshots | 1-3 MB per file | Yes. |
| Messenger files | Android/media/com.whatsapp | 50MB - 5GB | Yes (but check out the important media) |
Method 1: Cleaning the gallery through a standard application
The easiest way is to use the built-in MIUI gallery, which can find duplicates, sort files by size, and offers the Optimization tool. Here's how it works:
- Open the Gallery app (a flower icon).
- Slip on three dots in the upper right corner β select Control.
- Go to the optimization tab.
- The system will scan the memory and suggest:
- ποΈ Delete duplicates (compares photos by hash)
- π Clear large files (video) >100MB, photo >10MB)
- π Unnecessary screenshots (over 30 days)
- π Clean the cart (files are stored there for 30 days)
After selecting files to delete, click Clear and confirm the action.This method is safe, but only deletes visible files - the cache and hidden folders will remain intact.
Are important photos synchronized with the cloud?|Is there a backup on the PC?|Is auto-disabled? HDR (he creates takes)|Checked folders messengers on important media-->
β οΈ Attention: If you are using MIUI 14+, The Control menu has a "Deep Clean" option that deletes not only files, but also gallery metadata, which can cause album sorting to fail, and once cleaned, the app will restart and re-index all media (it can take up to 10 minutes).
Method 2: Manually clean hidden folders (for advanced ones)
If the standard cleaning didn't work, you should go to the hidden system folders, and you'll need a root Explorer (such as MiXplorer or Solid Explorer).
- Install MiXplorer from XDA Developers (the Play Market version does not have root access).
- Turn on the display of hidden files: in MiXplorer tap on three lines β Settings β Show hidden files.
- Go to /storage/emulated/0/ and delete the contents of the following folders:
DCIM/.thumbnails # Miniatures (can be removed completely)
Android/media/com.miui.gallery/cache # Cash Gallery
Android/data/com.miui.gallery #Temporary Files
Pictures/.thumbnails # Additional thumbnailsDo not delete DCIM/Camera and Pictures/Screenshots folders completely β only their contents after backup!
What happens if you delete the.thumbnails folder?
For Xiaomi models on Android 13+ (such as Xiaomi 13 Ultra or Redmi K60), the path to cache may be different:
Android/media/com.android.providers.media/.thumbnailsπ‘
If the gallery is running slower after cleaning, restart the phone, and the system will reset the index of media files, and the speed will return to normal.
Method 3: Cleaning through phone settings (without root)
Do you want to go through the file system? Use the built-in MIUI tools:
- Go to Settings β Applications β Application Management.
- Find the gallery (com.miui.gallery) and tap on it.
- Select Warehouse. β Clear the cache.
- Go back and select Clear Data (this will remove the gallery settings, but not the photos themselves!).
For further cleaning:
- Go to Settings. β Memory.
- Put it on the cleanup. β Deep cleaning.
- Check the boxes "Residual files" and "Cash thumbnails" β click Clear.
This method removes up to 1-2 GB of unnecessary data, but does not touch user files, suitable for POCO X3, Redmi 10 and others with MIUI 12-15 models.
Once a week.|Once a month|Only when memory ends|Never cleaned.-->
Method 4: Using ADB for deep cleaning (for geeks)
If you're ready for experimentation, ADB (Android Debug Bridge) will help you remove system debris that's not available through the interface, a method that requires a PC and USB debugging.
Steps:
- Turn on Developer Mode on your phone: Settings β About Phone β MIUI version (shap 7 times).
- Return to Settings β Additional β For developers and enable USB debugging.
- Connect your phone to your PC, install it. ADB-Drivers and open the command line in the folder with adb.exe.
- Follow the commands:
adb shell
pm clear com.miui.gallery #Cleaning up gallery data
rm -rf /sdcard/DCIM/.thumbnails # Removal of thumbnails
rm -rf /sdcard/Android/media/com.miui.gallery/cache # Cache removalFor Android 11+ models, additional confirmation on the phone (storage access permission) may be required.
β οΈ Note: The pm clear com.miui.gallery command will reset all gallery settings, including album sorting and hidden folders. MIUI, The contents will be visible after cleaning!
π‘
ADB-Cleaning is the most radical method, but it removes even files that are not visible through the Explorer.
Method 5: Cleaning Automation (for lazy people)
To avoid manually cleaning the gallery, set up automatic optimization:
- π€ Mi Cloud: Enable autosynchronization of photos and deletion of local copies after download (Settings) β Xiaomi account β Mi Cloud β gallery β Autoboot).
- π Memory Optimizer: In Settings β Memory. β Autocleaning Enable the option "Clean the cache of the gallery".
- π Google Photos: Set up "Free Place" (Settings) β Free up space) to remove local copies of already uploaded photos.
- π MacroDroid: Create a rule that will clean the.thumbnails folder once a week (root required).
Xiaomi models with MIUI 15 (such as Xiaomi 14) have a feature called βSmart Cleanupβ that analyzes memory usage and suggests that unnecessary files be deleted automatically.
- Go to Settings. β Memory.
- Slip on three dots in the top corner β Cleaning settings.
- Turn on Smart Cleanup and set up a schedule (e.g. every Saturday at 3:00).
What if the gallery doesnβt work after cleaning?
Sometimes, after a deep cleaning, the Gallery app starts to give out errors or not display a photo.
- Reboot your phone β 80% of the time, it solves the problem with re-indexing.
- Clear the application data (Settings β Applications β Gallery β Storage β Clear the data).
- Update the gallery via Play Market (if you use Google Gallery) or GetApps (for standard MIUI Gallery).
- Reset the media settings:
adb shell
pm clear com.android.providers.mediaIf the photos are still not displayed, check to see if they are hidden. MIUI has a Hidden Albums feature that can be activated by accident to turn it off:
- Open the gallery.
- Slip on three points β Settings β Hidden albums.
- Enter the password (if installed) and check the contents.