The Data folder on Xiaomi smartphones is a system directory that stores app settings, cache, temporary files and user data. Over time, it grows to several gigabytes, taking up precious space in the deviceโs memory. But deleting this folder is not an easy task: improper actions can lead to MIUI malfunctions, data loss, or even a phone โbrickโ.
In this article, weโll look at 5 safe ways to clean your Data folder, from manually deleting unnecessary files to completely resetting them via Fastboot, and learn which files can be deleted without risk and which ones canโt be touched, even if they take up a lot of space. Special attention will be paid to the models of Redmi Note 12, Poco X5 and other popular devices 2023-2026 with MIUI 14.
We warn you right away: deleting the Data folder through the file manager without root permission will only clean the cache, but will not free up significant space. Deep cleaning will require special tools or factory reset. If your goal is to free up memory for new applications, first try the alternative methods described in the section on storage optimization.
1.What is the Xiaomi Data folder and why it canโt be simply deleted
The /data folder in Android is the partition of internal memory where you store:
- ๐ Application settings (for example, saved games, logins in messengers)
- ๐๏ธ Cache and temporary files (remains from updates, thumbnails of images)
- ๐ System data (databases) MIUI, configuration)
- ๐ฑ User files (downloads, screenshots, if saved in the /data/media/0)
On Xiaomi smartphones, this folder typically takes anywhere from 3 to 5 GB on new devices to 15 to 20 GB after a year of use. The main problem is that the system does not allow you to delete it completely without superuser rights (root). Even if you see the Data folder in the file manager (for example, in Mi File Explorer), an attempt to delete will lead to an error of โInadequate rightsโ or โSystem folder is protectedโ.
Moreover, deleting /data completely is equivalent to a hard reset, as all user data is erased, including:
- ๐ฑ Contacts and messages (if not synced with Mi Cloud)
- ๐ฎ Save in games (such as Genshin Impact or Call of Duty Mobile)
- โ๏ธ System settings (wallpaper, brightness, sound profiles)
โ ๏ธ Note: If you see tips like "remove the Data folder through" TWRP" Without a backup, it's a dangerous recommendation!
2. Method 1: Clearing the cache of the Data folder without root rights
The safest method is to delete temporary files and cache that do not affect critical data, which is suitable for all Xiaomi models, including the Redmi 10, Poco F4 and Mi 11, without the need to unlock the bootloader.
Steps for cleaning:
- Open Settings โ Applications โ Application Management.
- Slip on the three dots in the upper right corner and select "Sort by size."
- Select apps with a large cache (e.g. YouTube, TikTok, Facebook).
- Press "Storage" โ "Clear the cache".
For deeper cleaning, use the built-in MIUI tool:
- Go to Settings โ About the phone โ Memory.
- Slip on "Cleaning" (or "Junk" in new versions).
- Select "Deep Clean" and confirm the action.
This method will free up 1-3 GB of space, but will not delete user data of applications. To completely clean a particular application (for example, if the game takes 5 GB), use the option โClean dataโ, but remember: this will reset all settings and saves in this application.
Clear the app cache|Remove downloads from /data/media/0/Download|Remove thumbnails (folder.thumbnails)|Clear the call and message log (via Settings)|Erase data from unnecessary applications-->
Method 2: Delete the Data folder via TWRP (for advanced users)
If you have a bootloader unlocked and a custom TWRP recap installed, you can manually remove unnecessary files from /data, a method that is suitable for advanced users as it requires knowledge of folder structure and risks disrupting the system.
Step-by-step:
- Turn off your phone and press Volume Up + Power to enter TWRP.
- Go to the File Manager section.
- Open the folder. /data Find directories that can be safely removed: ๐๏ธ /data/log โ Logs of the system (can be deleted) ๐ผ๏ธ /data/system/thumbnails โ picture-size ๐ฅ /data/media/0/Download โ downloads if not necessary)
"Delete"
/data/data
Reset the device.
โ ๏ธ Note: Delete folders like /data/dalvik-cache or /data/app It will cause a bootloop, and if you're not sure, don't touch the file!
After cleaning through TWRP, it is recommended to execute a command to restore rights:
adb shell chmod -R 777 /data/media/0What happens if you delete /data/data?
4. Method 3: Fastboot Reset (Full Data Cleanup)
If the Data folder is over 10GB and other methods don't work, the only radical way is to completely reset through Fastboot, which erases all data, including apps, settings and files in internal memory, but keeps the system running smoothly.
Requirements:
- ๐ Computer with drivers installed ADB/Fastboot.
- ๐ฑ Unlocked bootloader (some Xiaomi models require account binding).
- ๐ Battery charge of at least 50%.
Instructions:
- Turn off the phone and press Volume Down + Power to log into the Fastboot.
- Connect the device to the PC and open the command line.
- Enter the command to check the connection: fastboot devices should display the serial number of your Xiaomi.
- Run full reset: fastboot erase userdata fastboot erase cache fastboot reboot
Once rebooted, the device will be like new, with free memory, a method guaranteed to delete the entire Data folder, but require reconfiguration of the phone.
๐ก
Before resetting via Fastboot, save your device's IMEI. To do this, type in Fastboot mode the command fastboot getvar imei and write down the values. In rare cases, after reset, the IMEI may reset and have to be restored through the engineering menu.
5. Method 4: Using ADB for partial cleaning
If you have access to ADB (Android Debug Bridge), you can delete individual files from /data without completely resetting.This method is suitable for removing large, unnecessary files, such as residues from old firmware or logs.
Example of cleaning commands:
- Delete logs: adb shell rm -rf /data/log/*
- Dalvik cache clearing: adb shell rm -rf /data/dalvik-cache/*
- Delete temporary update files: adb shell rm -rf /data/ota_package/*
To see which folders take up the most space, use the command:
adb shell du -sh /data/* | sort -rhThis will show a folder list in /data, sorted by size. Be careful: deleting the wrong files may disrupt MIUI.
Hand-cleaning cache|Reset via Settings|Used. TWRP|ADB-team|I've tried nothing.-->
Method 5: Transfer of data to SD-map (alternative to deletion)
If the Data folder has grown because of apps, but you donโt want to clean it, consider migrating some of the data to a microSD. This method is suitable for Xiaomi models with memory cards support (for example, Redmi Note 11, Poco M4 Pro).
How to transfer data:
- Insert microSD (UHS-I U3 class is recommended for speed).
- Go to Settings โ Storage โ Internal Memory.
- Select "Transfer data to" SD-map" (not available for all applications).
- For games and large applications, use App2SD or Link2SD (root rights required).
Limitations of the method:
- โ Not all apps support portability (such as WhatsApp or Banking apps).
- โ ๏ธ On slow memory cards (Class) 4/6) applications will be slowed down.
- ๐ After extraction SD-Maps of the transferred applications will stop working.
7.Table: What can and cannot be deleted in the Data folder
| Folder/File | Can I remove it? | Effects of removal | Recommendation |
|---|---|---|---|
| /data/log | โ Yes. | Loss of system logs (uncritical) | Remove regularly |
| /data/dalvik-cache | โ ๏ธ Partially. | Slowing down applications before cache reassembly | Remove only when there is a shortage of space |
| /data/media/0/Download | โ Yes. | Loss of downloaded files | Transfer important files before deleting them |
| /data/data/<package> | โ No. | Resetting settings and application data | Use "Clear Data" in Settings |
| /data/system | โ No. | Misfunction of MIUI, possible bootloop | Don't touch it without a backup. |
8. Frequent mistakes and how to avoid them
Many Xiaomi users have experienced problems after trying to clean the Data folder, and here are the most common mistakes and ways to prevent them:
Error 1: Delete /data/data folder without backup
This results in the loss of all user data of the applications. If you accidentally delete this folder, you can only recover data from the backup of TWRP or Mi Cloud (if synchronization was enabled).
Error 2: Using a root-access file manager without knowledge
Apps like Root Explorer or FX File Manager allow you to delete system files, but without understanding the /data structure, you risk removing critical components. Always check what you delete through ls or du commands in ADB.
Error 3: Interrupting the cleaning process
If you clean /data via TWRP or Fastboot, never remove the battery or restart the device until the process is complete.This can cause file system damage and the need for flashing.
โ ๏ธ Note: On Xiaomi devices with MIUI 14 And new Attempt to delete /data/adb or /data/misc may block access to ADB You can only re-access through an authorized Mi Account.
๐ก
Before any manipulation of the Data folder, create a backup via TWRP or Mi Cloud.Even experienced users sometimes make mistakes, and a backup will save you recovery hours.