You're trying to make room for the Xiaomi Redmi Note 12 or POCO X5 Pro, but photos are stubbornly returning to the gallery after being deleted? This problem is familiar to many owners of smartphones on MIUI, Xiaomi's branded shell. Most often, the fault is not the files themselves, but the mechanisms of their display: from the cache of the Gallery app to synchronization with the Mi Cloud.
In this article, weโll look at 7 main reasons why photos arenโt deleted from Xiaomiโs phone, from basic user errors to hidden system bugs. Youโll learn how to check if files are deleted from the deviceโs memory, why they can be โrecoveredโ after a reboot, and what to do if the issue is related to Media Storage or access rights. For each reason, weโll give you step-by-step instructions based on the latest versions of MIUI 14/15.
Important: Some solutions require access to Developer Settings or ADB. If you're not sure what you're doing, skip those steps -- they're marked with special warnings. Let's start with the simplest and get to the hardest.
1.Photos are not deleted due to the cache of the Gallery app
The most common reason for photos to come back is cached thumbnails. The Gallery app (or Google Photos, if installed) saves smaller copies of images for quick download, and even after deleting the original file, the thumbnail can be displayed in the interface, creating the illusion that the photo has โreturned.โ
How to check:
- ๐ Open the Gallery and find the deleted photo. Tap it and select Information (or Details) if the location section indicates a path of the type /storage/emulated/0/DCIM/.thumbnails โ This is cache.
- ๐ Use any file manager (such as Mi File Manager) and check the folder DCIM/.thumbnails. Here are the miniatures.
- ๐๏ธ If the photo opens, but the size of 0 KB is indicated in detail - the original is deleted, and only the preview is displayed.
How to clear the cache:
- Go to Settings โ Applications โ Application Management.
- Find the gallery (or Google Photos) and tap it.
- Select Warehouse. โ Clear the cache.
- Reboot the phone.
โ๏ธ Checklist for cleaning the cache
If you still show photos after cleaning the cache, move to the next section, and maybe the problem is deeper, the Media Storage system process.
2.The Media Storage system process does not update the database
In Android, the Media Storage system (or com.android.providers.media) scans the deviceโs memory and creates a database (media.db) that all applications, including the Gallery, use, and if this process freezes or the database is corrupted, photos can be displayed even after deleting.
Signs of a problem:
- ๐ The photos disappear after deletion, but reappear after a few minutes or after rebooting.
- ๐ In Settings โ Storage occupied space does not decrease after deleting files.
- ๐ซ New photos are not displayed in the gallery, although they are in the folder DCIM.
How to fix it:
- Media Storage: adb shell am force-stop com.android.providers.media adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard These commands send a signal to the system to "connect" the drive, forcing it to rescan the files. ADB And the debugging on. USB.
- Clear Media Storage Data (Secure, but Reset All Media Labels): Go to Settings โ Annexes โ Show all applications (โฎ) โ Show them system. Find the Media Storage. โ Clear the data.
๐ก
If the photos are missing after cleaning the Media Storage data, but returned after an hour, check the cloud sync (section 4).
โ ๏ธ Attention: Media Storage data cleanup will remove all custom tags, albums and gallery location tags, and the files on the device will remain intact, but they will have to be reorganized.
3. Photos are synced to Mi Cloud or Google Photos
If your Xiaomi has Mi Cloud or Google Photos enabled, deleted locally files can automatically be restored from the cloud, which is standard behavior, but many users forget about it.
How to check:
- ๐ฅ๏ธ Open the Settings. โ Accounts and synchronization โ Mi Cloud (or Google). Check if Gallery sync or Google Photos is enabled.
- ๐ฒ In the Google Photos app, go to Settings โ Backup and synchronization.
- ๐ If the cloud has a copy of the photo, it can download back when connected to Wi-Fi (especially if Auto-Recovery is enabled in Mi Cloud).
How to turn off auto-recovery:
- For Mi Cloud: Go to Settings โ Accounts and Sync โ Mi Cloud โ Gallery. Turn off Auto-Recover (or Gallery Sync). Delete photos from the cloud manually: open Mi Cloud โ Gallery in your browser and delete files.
- For Google Photos: Open the app, tap the avatar โ Photo settings โ Backup. Turn off Backup and Sync. Delete the photos from the Google Photos Recycle Bin (they are stored there for 60 days).
| Service | The path to settings | What to turn off |
|---|---|---|
| Mi Cloud | Settings โ Accounts โ Mi Cloud โ Gallery | Auto-Recovery, Synchronization Gallery |
| Google Photo | Appendix โ Avatar โ Settings โ Backup | Backup and synchronization |
| OneDrive | Appendix โ I โ Settings โ Backup | Automatic photo uploading |
โ ๏ธ Warning: If you delete photos from the cloud, they will disappear from all devices that enable sync. Before mass deletion, back up important files to your computer.
4.Photos are stored on SD-filesystem error card
If you use a microSD card on a Xiaomi smartphone, the problem may be caused by file system damage.
- ๐ Photos are deleted but returned after retrieving/pasting the card.
- ๐ซ New files are not saved to SD-map.
- โ ๏ธ Notification appears SD-map damaged.
How to check the card for errors:
- Connect. SD-card to the computer through the card reader.
- In Windows, open This computer, right-click on the map โ Properties โ Service โ Check.
- On a Mac, use Disk Utility (select card โ First Aid).
- On Linux, run the command: sudo fsck /dev/sdX1 (replace sdX1 with the current section of your map).
If the check didn't work,
- ๐ Format the map in FAT32 or exFAT (via phone or PC).
- ๐ Replace the card โ if it is old or cheap (class below Class 10), it may not be able to handle the load.
- ๐ฑ In the phone settings go to the Warehouse โ Settings (โ) โ Format as an internal drive (for high speed cards only!).
What to do if your phone canโt see SD-map?
5. Access rights or MIUI encryption block deletion
MIUI has two features that can prevent you from deleting files:
- Privacy Protection โ blocks access to files without confirmation.
- Folder encryption โ if the DCIM folder or individual photos are encrypted, they cannot be deleted without a password.
How to check:
- ๐ Try to delete the photo through the file manager. If you have a request to enter a password, the folder is encrypted.
- ๐ Go to Settings. โ Confidentiality โ Special permits โ Access files and check the rights for the Gallery.
Decisions:
- For encrypted folders: Open Settings โ Privacy โ Encrypted folders. Enter your password and unlock the folder with the photo. Delete the files manually.
- For limited rights: Go to Settings โ Applications โ Application Management โ Gallery โ Permissions. Make sure Storage and Files and Media are enabled.
โ ๏ธ Note: If you forget the password from the encrypted folder, you can't restore access to files without resetting your phone to factory settings. Xiaomi doesn't provide tools to unlock encryption without a password.
6. Virus or malware restores files
Rarely, some viruses block deleting files or recovering them from hidden copies, which is true if you have installed applications from unknown sources or connected your phone to an infected PC.
Signs of infection:
- ๐ฆ Photos return even after cache reset and cloud shutdown.
- ๐ฅ Unknown files appear in folders DCIM download.
- ๐ The phone is quickly discharged or warmed for no reason.
How to check and clean:
- Install an antivirus (such as Malwarebytes or Dr.Web Light) and scan the device.
- Check the list of installed apps in Settings โ Apps. Uninstall suspicious ones (especially with Administrator or Accessibility rights).
- Turn on Google Play Protect: Open the Google Play Store โ Menus (โฐ) โ Play Protect. Scan the slide.
If the virus is found:
- ๐๏ธ Delete infected files via Safe Mode (press the power button) โ Safe regime).
- ๐ Reset the phone to factory settings (Settings) โ The phone. โ Resetting settings).
๐ก
Android viruses are often disguised as system applications (such as Android System or Media Service).
7. Hardware failure or memory damage
If none of the above methods worked, the problem could be physical damage to the phone's memory.
- ๐ฑ Smartphones after falling or getting moisture.
- ๐ Devices with worn flash memory (especially after 3-5 years of use).
- ๐ ๏ธ Phones after unqualified repairs.
How to diagnose:
- ๐ Check the state of memory with the help of AIDA64 (storage โ Status. NAND). Pay attention to the Reallocated Sector Count and Uncorrectable Error Count settings โ if their values are above 0, the memory is worn out.
- ๐ง Connect your phone to your PC and try to delete files through ADB: adb shell rm -f /sdcard/DCIM/Camera/photo.jpg If the command returns a Read-only file system error, the memory partition went into read-only mode due to a hardware failure.
Decisions:
- ๐ Reset your phone to factory settings (this can temporarily restore memory access).
- ๐ If the warranty is valid, contact the Xiaomi service center.
- ๐พ Move your important data to a memory card or cloud, as continued use of your phone could result in the loss of all files.
โ ๏ธ Warning: If the phone is making errors when writing files (for example, failed to save a photo), you can not ignore the problem - this is a sign of imminent failure of memory.