The gallery on Xiaomi smartphones is one of the most voracious applications: it takes up gigabytes of memory not only in photos, but also in cache, thumbnails, duplicates and utility files. Even after manually deleting photos, the free space often melts at an alarming rate. Why?
In this article, we will discuss 5 proven ways to clean a gallery, from basic (delete unnecessary photos) to advanced (clear cache through ADB and hidden folders.thumbnails). Particular attention will be paid to models with MIUI 14/15, where the logic of file storage has changed. You will also learn how to avoid typical errors, such as the accidental deletion of screenshots or files from Telegram, which the gallery mistakenly indexes as photos.
Warning: Before mass deletion of files, make sure to check if they are not synced to the cloud. Xiaomi may have its default โAuthorizationโ feature enabled (Settings โ Xiaomi Account โ Mi Cloud โ Gallery) that deletes local copies after uploading to the cloud. If you clean the gallery without a backup, it will be impossible to restore images.
To start, identify what exactly is taking up space. Go to Settings โ Memory โ Memory Analysis and select Media Files. Here you will see the distribution by category: Photos, Videos, Screenshots, Downloads and Others. Pay attention to the item โCache Galleryโ โ it can reach 1-3 GB even if you empty gallery.
1. manually remove unnecessary photos and videos
The most obvious, but often ignored, way is by hand sorting, and many users delete only the latest images, forgetting about old folders, duplicates, and screenshots.
- ๐ Camera folder -- it's where all the photos taken on the front and the front cameras are stored, and often there are selfies with the same angle or failed shots.
- ๐ฑ Screenshots folder โ screenshots take up to 500 MB-1 GB, especially if you actively share information in instant messengers.
- ๐ Edited folder โ edited versions of the photo are saved here (even if the original is deleted).
- ๐ฅ Downloads folder โ the gallery indexes all uploaded pictures, including memes from Telegram or Telegram VK.
To speed up the process, use the selection mode in the gallery:
- Open the Gallery app.
- Click and hold any photo, then select the others.
- In the top panel, tap on ๐๏ธ ยซDelete" (or โฎ โ Delete).
- Confirm the action by pressing โOKโ.
Important! Deleted files go to the Recycle Bin (Gallery โ Albums โ Recycle Bin), where they are stored for 30 days. To make room right away, clean the Recycle Bin manually: highlight all files and click Delete Forever.
2. Search and remove duplicate photos
Duplicates are one of the main causes of memory overload, and they occur when:
- ๐ Transfer photos between devices (for example, via ShareMe or Bluetooth).
- ๐ฑ Automatic backup in Google Photos and Mi Cloud.
- ๐จ Photo editing (original) + edited).
MIUI 14/15 has a built-in tool for finding duplicates:
- Open the gallery. โ Albums. โ Duplicate (or) โฎ โ Management โ Duplicate).
- The app will automatically group the same photos. Select the unnecessary copies.
- Click "Delete" and confirm the action.
If your version of MIUI does not have this feature, use third-party apps:
- ๐ ๏ธ Files by Google โ in the โCleaningโ section there is a tool โDuplicatesยป.
- ๐ Duplicate Files Fixer โ search for duplicates not only photos, but also videos.
๐ก
Before removing duplicates, sort the photo by date (Gallery) โ โฎ โ Sorting โ It's easier to tell which copy is newer and better in quality.
Note: Some apps (such as WhatsApp or Viber) create thumbnails of chats in the Pictures folder, which may appear as duplicates, but it is not recommended to delete them, this will lead to errors in the messengers.
3.Cleaning gallery cache and thumbnails
Gallery cache and thumbnail folder (.thumbnails) can take anywhere from 500MB to 2-3GB, even if the gallery itself has few photos, which are needed to quickly download previews, but over time they accumulate and become useless.
Cleaning methods:
- ๐งน Through the App Settings: Go to Settings โ Annexes โ App management. Find the gallery and tap it. Select "Memoryยป โ ยซClear the cacheยป.
- ๐๏ธ Delete the.thumbnails folder manually: Connect your phone to your PC or use a file manager (such as Mi File Manager (/storage/emulated/0/). Enable the display of hidden files (โฎ โ Delete the.thumbnails and DCIM/.thumbnails.
Once the cache is cleared, the gallery will be slower when it first opens the albums โ it will take time to regenerate the thumbnails. That's normal and requires no additional action.
Check the space in the memory.
Create a backup of important photos
Close all applications that use the gallery (Viber, Telegram, etc.)
Restart your phone after cleaning.-->
4. Delete hidden and service files
DCIM, Pictures and Downloads folders often hide files that don't appear in the gallery but take up space.
- ๐ Files with the.nomedia extension block the display of folders in the gallery, but they can weigh tens of megabytes.
- ๐ฅ Video cache from TikTok, Instagram or YouTube โ stored in the /Android/data/.
- ๐ Folders from remote applications (for example, com.whatsapp or com.viber.voip).
To find and remove them:
- Use a file manager with access to root folders (such as Solid Explorer or FX File Manager).
- Turn on the hidden files and go to /storage/emulated/0/.
- Look for folders with names:.cache,.temp,.backup Android/data/ (here is the app cache) tencent/MicroMsg/ (weChat cache)
Don't touch it.
com.xiaomi.gallery
โ ๏ธ Attention: Do not delete folders Android/obb/ โ This is where game data is stored, for example, PUBG Deleting them will cause game disruptions.
| Type of file | Location. | Can I remove it? |
|---|---|---|
| Miniatures (.thumbnails) | /DCIM/.thumbnails, /.thumbnails | Yes (restore automatically) |
| Cash Google Photo | /Android/data/com.google.android.apps.photos/ | Yes (but the sync settings will reset) |
| .nomedia files | Any media folder. | Yes (but the folder will be visible in the gallery again) |
| Cash messengers | /Android/data/com.whatsapp/, /tencent/MicroMsg/ | Partially (remove only the cache folders) |
5. Advanced methods: ADB and gallery reset
If standard methods didnโt help and the gallery still takes gigabytes of memory, try resetting the appโs settings or cleaning through ADB. These methods are suitable for power users.
Method 1: Reset the gallery to factory settings
- Go to Settings โ Applications โ Application Management โ Gallery.
- Click on โStorageโ โ โClear Dataโ.
- Confirm the action. This will delete all gallery settings, but it won't affect the photos themselves.
Method 2: Cleaning through ADB (for advanced)
If the gallery is โglutchingโ and does not display the photo correctly, follow the commands:
adb shell pm clear com.miui.gallery
adb shell rm -rf /storage/emulated/0/DCIM/.thumbnails
adb shell rm -rf /storage/emulated/0/.thumbnailsโ ๏ธ Attention: Teams ADB require the debugging enabled USB (Settings โ The phone. โ Version. MIUI โ 7 times tap the build number, then Settings โ Additionally. โ For developers โ Debugging by USB). Improper use can lead to system failures.
What if the gallery does not open after cleaning?
6. Cleaning automation: MIUI settings and third-party utilities
To avoid manually cleaning the gallery, set up automatic optimization:
- โ๏ธ Setting up Mi Cloud: Go to Settings โ Xiaomi account โ Mi Cloud โ Gallery. Turn off Autoreserve if you don't want your photos deleted from your phone after uploading to the cloud. Turn on Storage Optimization, which will only save thumbnails on your phone, and the originals will be downloaded on request.
Third-party utilities for automatic cleaning:
- ๐ Automate โ lets you create a rule for weekly cache cleaning.
๐ก
Regularly cleaning the gallery (once every 1-2 weeks) prevents the accumulation of cache and duplicates. Set up notifications in MIUI Optimizer or use the Memory Cleanup widget** on the home screen.
Frequent Mistakes and How to Avoid Them
When cleaning the gallery, users often face problems:
- ๐ซ Delete files from Telegram or WhatsApp: The gallery indexes media from instant messengers. If you delete them through the gallery, they will disappear in chats. To avoid this, open the messenger settings and turn off "Save in the gallery" (Settings). โ Memory and data โ Keeping Media on Telegram).