The gallery on Xiaomi smartphones eventually turns into a real βblack boxβ: thousands of screenshots, duplicate photos, thumbnail cache and hidden files from messengers take up gigabytes of memory. At the same time, the standard removal of photos through the application interface does not clean up system data, which keeps the memory βthawingβ in front of your eyes. If your Redmi, POCO or Mi gives a notification βMemory is fullβ, and the gallery is empty β the problem is the accumulated data of the application.
In this article, we will discuss 5 proven cleaning methods, including hidden MIUI functions that are not documented in the official instructions. From simple decache to deep cleaning through ADB, choose the method for your task. All instructions are relevant for MIUI 14/15 based on Android 13/14, but the techniques work on older versions (starting with MIUI 12).
1. Standard cleaning of gallery cache through settings
The safest and fastest way is to remove the cache of the Gallery app (com.miui.gallery).This will not affect your photos, but will free up to 1-3 GB of memory occupied by thumbnails, temporary files and metadata, POCO X5 Mi 11.
How to do this:
- π± Open the Settings. β Annexes β Application management.
- π In the search bar, type βGalleryβ and select the application.
- ποΈ Press Warehouse. β Clear the cache.
- π For deep cleaning tap Clean data (β οΈ It'll reset sorting settings and albums).
Once the cache is cleared, the gallery will be rebuilt the next time it starts β it can take anywhere from 30 seconds to a few minutes depending on the number of photos. If the thumbnails are not displayed correctly after the procedure, restart the device.
2. Delete hidden files and folders (.thumbnails,.nomedia)
The Gallery app and instant messengers create hidden folders that are not visible in the standard conductor, but take up space.
- πΌοΈ.thumbnails β cache of thumbnails (can weigh up to 500MB).
- π.nomedia β files excluded from scanning (often empty or with duplicates).
- π€ DCIM/.thumbnails and Pictures/.thumbnails β duplicate.
To remove them:
- Install a file manager with hidden file support (such as FX File Explorer or Solid Explorer).
- Turn on the display of hidden folders in the manager settings.
- Go to the root directory of the storage (/storage/emulated/0/) and delete the folders:.thumbnails DCIM/.thumbnails Pictures/.thumbnails Download/.thumbnails (if any)
π‘
Check the contents of folders before deleting β sometimes important thumbnails from edited photos are stored there (for example, after processing in Snapseed or Lightroom).
Once removed, restart the gallery. If the thumbnails are gone, don't panic: they will recover automatically the next time you view the photo. The key is don't delete the entire DCIM or Pictures folders, just their hidden subfolders!
3. Clean through Safe Mode (if gallery brakes)
If the gallery freezes while scrolling or does not open the photo, the problem may be in conflict with other applications (for example, cloud services or optimizers), in which case Safe Mode, a mode where only system applications work, will help.
How to start:
- Press the power button before the turn off menu appears.
- Slip and hold the option to Turn Off (or Reboot on new models).
- Confirm the transition to Safe Mode (the inscription will appear at the bottom of the screen).
In this mode:
- π§Ή Clear the gallery cache (see section 1).
- π Check if the photos open without hanging.
- π± If the problem is gone, it's the third-party app's fault. Uninstall the recently installed programs (especially optimizers like Clean Master).
What to do if Safe Mode is not enabled?
4. Reset gallery settings (without loss of photo)
If after all the manipulations, the gallery still displays photos incorrectly or does not sort albums, resetting the app will help, which will return the standard display parameters, but will not delete the photos themselves.
Instructions:
- Go to Settings β Applications β Application Management β Gallery.
- Select Warehouse β Delete data (not cache!).
- Confirm the action. The app will return to factory settings.
After discharge:
- π Favorites, Screenshots and Downloads will be empty β they will have to be filled again.
- πΌοΈ Slideshow settings, transition effects and sorting will reset.
- π Access permissions to folders (for example, for Google Photos) will need to be reissued.
Backup important albums (export to Google Photos)
Remember the current display settings (view: list/grid)
Check if photos are used in desktop widgets
Make sure that your cloud sync is enabled (if necessary)-->
5. Deep cleaning through ADB (for experienced)
If standard methods didnβt work and the gallery is still eating away at memory, itβs time for a low-level cleaning through Android Debug Bridge (ADB) that removes all of the appβs data, including system files that are not visible to the user.
β οΈ Attention: Wrong commands ADB This method can cause data loss or system failure. Use this method only if:
- You have taken a full backup photo (for example, in Google Photos).
- You are ready for the gallery to be re-installed.
- You know what youβre doing (or you follow the instructions literally).
Step-by-step:
- Enable USB debugging in the developer settings (Settings β About Phone β MIUI version β tap 7 times, then go back to Additional β For Developers).
- Connect your phone to your PC and install ADB Tools (download from the official website).
- Open the command line in the adb.exe folder and execute: adb devices (you should display your device).
- Enter the command to completely reset the gallery: adb shell pm clear com.miui.gallery
Once the command is executed, the Gallery app will be completely reset, including:
- ποΈ All settings and albums.
- π Cash and temporary files.
- π Access rights to folders.
When you first start up after you reset, the gallery will re-index the entire photo, which can take up to 10-15 minutes.
π‘
The pm clear command is equivalent to uninstalling an application and reinstalling it, but without loss. APK-This is the most radical cleaning method that is guaranteed to remove all the tailsΒ».
Comparison of cleaning methods: what to choose?
Not all methods are equally effective. In the table below, you can compare them by key parameters:
| Method | Difficulty | Place vacated | Risk of data loss | Implementation time |
|---|---|---|---|---|
| Clearing the cache | β (simple) | 100MB - 1GB | No. | 1-2 minutes |
| Removing hidden folders | ββ (You need a file manager) | 200 MB - 2 GB | Low (if not removed) | 5-10 minutes |
| Safe Mode | ββ | It does not free up space, but solves mistakes. | No. | 3-5 minutes |
| Reset gallery settings | ββ | Up to 500 MB (through metadata deletion) | Medium (albums disappear) | 2-3 minutes |
| ADB-cleaning | βββ (PC) | 1β3 GB (full cleaning) | High (in case of mistake) | 10-15 minutes |
For most users, a combination of the first two methods (cache cleaning + hidden folders removal) is enough. If the gallery is unstable, add Safe Mode. ADB leave it for an emergency.