How to completely clean up gallery data on Xiaomi: secure methods and hidden features

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).

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.

πŸ“Š How often do you clear the cache of the gallery on Xiaomi?
Once a week.
Once a month
Only when memory ends
Never cleaned.

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:

  1. Install a file manager with hidden file support (such as FX File Explorer or Solid Explorer).
  2. Turn on the display of hidden folders in the manager settings.
  3. 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!

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:

  1. Press the power button before the turn off menu appears.
  2. Slip and hold the option to Turn Off (or Reboot on new models).
  3. 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?
On some models (e.g., POCO F4), Safe Mode activates differently: turn off the phone, then press Volume down + Power before the system boots. If it doesn't work, check if the mode is disabled in the developer settings (Debugging by USB β†’ Allow Safe Mode).

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:

  1. Go to Settings β†’ Applications β†’ Application Management β†’ Gallery.
  2. Select Warehouse β†’ Delete data (not cache!).
  3. 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:

  1. Enable USB debugging in the developer settings (Settings β†’ About Phone β†’ MIUI version – tap 7 times, then go back to Additional β†’ For Developers).
  2. Connect your phone to your PC and install ADB Tools (download from the official website).
  3. Open the command line in the adb.exe folder and execute: adb devices (you should display your device).
  4. 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:

MethodDifficultyPlace vacatedRisk of data lossImplementation time
Clearing the cache⭐ (simple)100MB - 1GBNo.1-2 minutes
Removing hidden folders⭐⭐ (You need a file manager)200 MB - 2 GBLow (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.

❓ Why After Cleaning the Cache, the Gallery Takes Up a Lot of Space Again?
The cache of the gallery is restored when you see a photo, to slow its growth: πŸ“΅ Turn off automatic thumbnail creation in gallery settings (Settings) β†’ Additionally. β†’ Optimization of miniatures). πŸ—‘οΈ Clean the cache regularly (once every 1-2 weeks). πŸ–ΌοΈ Use the cloud galleries (Google Photos, Mi Cloud) to store originals.
❓ Can I clean the gallery without losing my photo?
All the methods in this article (except for the ADB If used incorrectly, the original photo is retained: πŸ”„ Albums and tags (such as "Favorites") can be reset. πŸ“‚ Hidden folders (like.nomedia) sometimes contain unique files β€” check them before you delete them. For complete security, back up through Google Photos or Mi Cloud.
❓ Why Xiaomi Gallery Doesn't Show All Photos?
Causes and solutions: πŸ“ Hidden folders: Check if there is a.nomedia file in the photo folder (it blocks scanning). πŸ” Gallery filters: Slip on three dots in gallery β†’ Show all the folders. πŸ€– Indexing failure: Clear the cache and reboot the phone. πŸ“± Access Rights: Go to Settings β†’ Annexes β†’ gallery β†’ Rights. β†’ Storage and turn access on.
❓ How to clean gallery from duplicate photos?
MIUI It does not have a built-in tool for finding duplicates, but you can: Use third-party apps like Files by Google (the Cleanup tabΒ» β†’ Β«Duplicates. Manually sort the photo by date (Gallery) β†’ Albums. β†’ By date) and delete repeating. πŸ–₯️ Connect your phone to your PC and use programs like Duplicate Cleaner or CCleaner. ⚠️ Before mass removal of duplicates, check if they are edited versions (for example, cropped or filtered).
❓ Why After Updating MIUI gallery started to slow down?
This is a common problem after major updates (for example, with the MIUI 13 on MIUI Decisions: 🧹 Clear the gallery cache and reboot the phone. πŸ”„ Turn off animations: Settings β†’ The phone. β†’ Version. MIUI (Tap 7 times for Developer Mode, then Settings β†’ Additionally. β†’ For developers β†’ The scale of window animation β†’ select Off.. πŸ“± Reset the gallery settings (see section 4). πŸ”§ If nothing helps, go back to the previous version. MIUI via Fastboot (see instructions at xiaomi.eu).