Deleting folders on Xiaomi smartphones may seem like a simple task, but users often face unexpected problems: the system prevents you from deleting a folder because of βprotected filesβ, then after deleting it itself, important data disappears without the possibility of recovery. In this article, we will discuss all the working ways to disband folders on devices with MIUI firmware, from standard methods to hidden functions and commands via ADB.
Special attention will be paid to folders that are not deleted in standard ways (for example, MIUI or Android system directories), you will learn how to safely clean unnecessary data without damaging the smartphone, and what to do if the folder is invisible or protected by root rights.
Before you start, remember that some folders (like DCIM or Download) can be automatically restored by the system. This is not a bug, but a feature of MIUI. If your goal is to free up space, first check which files take up the most memory in Settings β Memory.
1. Delete the folder through the standard MIUI file manager
The easiest way is to use Xiaomi's built-in file manager, which is pre-installed on all devices and supports basic file operations, to delete the folder:
1. Open the Files app (the icon with the folder on the desktop).
2 Go to Local Storage or Internal Memory.
3. Find the desired folder and hold your finger on its name for 1-2 seconds.
4. In the menu that appears, select Remove (basket icon).
If the Remove button is inactive (in gray), it means that the folder is protected by the system, in which case try alternative methods from the following sections.
βοΈ Preparation for folder deletion
β οΈ Note: Do not delete folders with Android names, MIUI, system or data β this can cause your smartphone to fail. Also avoid deleting folders created by system applications (e.g. com.xiaomi).
2. Removal via PC (Windows/Mac) assisted USB-cable
If the MIUI file manager refuses to delete the folder, connect the smartphone to the computer, a method that often works for folders that are "not visible" or locked on the device itself.
1. Connect Xiaomi to the PC via USB-cable (preferably original).
2. On your smartphone, select file transfer mode: File transfer (MTP) or USB-storage device (in the connection notification).
3. On your computer, open this computer (Windows) or Finder (Mac) and find the connected device.
4. Go to the folder you want to delete and click Delete (or drag to the cart).
If the folder is not deleted and the error "File is used by another program" is given, try the following steps:
- π Reboot your smartphone and try again.
- π οΈ Start your computer in Safe Mode (on Windows: Hold the Shift when you restart).
- π± On your smartphone, disable all background apps through Settings β Annexes β Launched.
β οΈ Note: Some Xiaomi models (e.g. Redmi Note 10 Pro) POCO X3) when connected through USB may need to be unlocked OEM In Settings β For developers, without it, the computer won't see the internal memory.
3. Delete system folders via ADB (for power users)
If the folder is root protected or belongs to a system application, it can only be deleted via ADB-This method requires the inclusion of debugging by USB and is suitable for users familiar with console commands.
1. Enable Developer Mode:
Go to Settings β About the phone.
Click on the MIUI version 7 times until the notification βYou are a developer!β appears.
- Return to Settings β Additional β For developers and enable debugging over USB.
2. Connect your smartphone to your PC and open Command Prompt (Windows) or Terminal (Mac/Linux).
3. Enter a command to check the connection:
adb devicesIf the device appears in the list, run the command to delete the folder (replace /sdcard/Folder Name with the real path):
adb shell rm -rf /sdcard/ Name of the Folderβ οΈ Attention: Command rm -rf It permanently deletes the folder and all of its contents. A path error can result in the deletion of critical system files:
adb shell ls /sdcard/What if the ADB canβt see the device?
4. Delete βinvisibleβ folders (hidden files and cache)
Some folders (such as.thumbnails or.data) are hidden by default and don't show up in a standard file manager.
1. Open Files β Click on the three dots in the upper right corner β Settings.
2. Enable the option to Show hidden files.
3. Go back to the root directory and find folders whose names start with a dot (e.g.,.cache).
To remove the cache of system applications:
- π§Ή Go to Settings. β Annexes β Application management.
- π± Select the desired application (for example, Gallery or Downloads).
- ποΈ Click Clear cache (not to be confused with Clear data!).
β οΈ Attention: Deletion of folders.android_secure.estrongs may disrupt some applications (e.g, ES If the application stops running after cleaning, reinstall it.
5. Recovery of accidentally deleted folders
If you delete an important folder (such as photos or documents), you can try to restore it.
| Programme | Supported devices | Opportunities | Reference |
|---|---|---|---|
| DiskDigger | All Xiaomi (root required) | Recovery of photos, videos, documents | Google Play |
| Recuva | Only when connected to a PC | Deep memory scanning | Official website |
| EaseUS MobiSaver | Xiaomi, POCO, Redmi | Restoration without root (limited) | EaseUS website |
β οΈ Warning: The faster you start recovering from deletion, the better the chances of returning files. Do not write new data to your smartphone (do not install apps, do not take photos), otherwise deleted files can be overwritten.
If the folder has been removed from Google Photos or Mi Cloud, check the Recycle Bin in these services:
- π· In Google Photos: Open the app β Library β Recycle bin (files are stored for 60 days).
- βοΈ In Mi Cloud: Go to i.mi.com β Basket (storage 30 days).
π‘
Before recovering, copy all current files from your phone to your PC β this will prevent data loss in case of possible program failures.
6.Why does the folder come back after deleting?
Some folders (e.g. Download, DCIM, Pictures) are automatically created by the system or applications. If you delete them but they reappear, this is normal MIUI behavior.
- π₯ System processes: Download folder is restored when the first file download from the browser.
- πΈ Appendices: Gallery or Camera created DCIM photo-storage.
- π Updates MIUI: After updating the firmware can restore standard directories.
To prevent automatic folder creation:
- Use alternative applications (e.g. Files by Google instead of the standard manager).
- Reconfigure the save paths in the application settings (for example, in Chrome, change the download folder).
- Turn off automatic sync in Settings β Accounts β Mi Cloud.
β οΈ Attention: If the folder MIUI Android is restored after removal through ADB, This means that it's secure at the firmware level, and repeated attempts to delete it can cause the smartphone to reboot cyclically.
π‘
Folders created by the system (such as DCIM or Download) cannot be permanently deleted β they will be restored. Instead, clean their contents or reconfigure the ways of saving in applications.
7. Alternative methods: cleaning applications
If standard methods don't work, you can use third-party utilities, which often have extended access rights and can delete stubborn folders.
- π§Ή Files by Google: Lightweight manager with garbage cleaning function. Download: Google Play.
- π‘οΈ SD Maid: Can delete residual files and cache (root required for full functionality) Download: Google Play.
- π Root Explorer: For root-right users, it allows you to edit system folders. Download: Google Play.
Before using third-party applications:
1. Check reviews and rankings on Google Play (avoid programs with a score below 4.0).
2.Do not give applications superuser rights (root) unless you are sure of their security.
3. Create a backup of data through Settings β Additional β Backup.
β οΈ Note: Apps like Clean Master or CCleaner often remove not only garbage, but also useful files (such as saving games), use them with caution or prefer official utilities from Google or Xiaomi.