How to delete the Data folder on Xiaomi: 5 proven methods without harming the system

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:

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Slip on the three dots in the upper right corner and select "Sort by size."
  3. Select apps with a large cache (e.g. YouTube, TikTok, Facebook).
  4. Press "Storage" โ†’ "Clear the cache".

For deeper cleaning, use the built-in MIUI tool:

  1. Go to Settings โ†’ About the phone โ†’ Memory.
  2. Slip on "Cleaning" (or "Junk" in new versions).
  3. 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:

  1. Turn off your phone and press Volume Up + Power to enter TWRP.
  2. Go to the File Manager section.
  3. 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/0
What happens if you delete /data/data?
The /data/data folder contains all the user data of the applications (saves, settings, databases) and deleting it is equivalent to completely resetting the phone to factory settings. The system will create a new folder the next time it runs, but all the applications will be โ€œas after installationโ€, and personal data (photos, videos) will remain intact only if they are stored in /data/media/0 (internal memory).

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:

  1. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  2. Connect the device to the PC and open the command line.
  3. Enter the command to check the connection: fastboot devices should display the serial number of your Xiaomi.
  4. 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 -rh

This 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:

  1. Insert microSD (UHS-I U3 class is recommended for speed).
  2. Go to Settings โ†’ Storage โ†’ Internal Memory.
  3. Select "Transfer data to" SD-map" (not available for all applications).
  4. 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/FileCan I remove it?Effects of removalRecommendation
/data/logโœ… Yes.Loss of system logs (uncritical)Remove regularly
/data/dalvik-cacheโš ๏ธ Partially.Slowing down applications before cache reassemblyRemove only when there is a shortage of space
/data/media/0/Downloadโœ… Yes.Loss of downloaded filesTransfer important files before deleting them
/data/data/<package>โŒ No.Resetting settings and application dataUse "Clear Data" in Settings
/data/systemโŒ No.Misfunction of MIUI, possible bootloopDon'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.

FAQ: Answers to Frequent Questions

๐Ÿ” Why does the Data folder take up so much space even if I haven't installed anything?
The data folder is growing because of: ๐Ÿ“น Video cache and thumbnails (especially if you watch a lot of content on YouTube or TikTok). ๐Ÿ“ฆ Remains from updates MIUI (folder /data/ota_package can weigh up 1โ€“2 GB). ๐Ÿ—ƒ๏ธ System logs and memory dumps (created when applications crash) To reduce its size, regularly clean the cache through Settings โ†’ Memory. โ†’ Cleanup.
๐Ÿ“ฑ Can I delete the Data folder on Xiaomi without root?
Without root rights, you can: Clear the cache of individual applications. Delete files from /data/media/0 (internal memory). Reset via Settings โ†’ Reset or Fastboot. Complete removal of /data without root is impossible - this is the protection of Android from accidental damage to the system.
โš™๏ธ How to Recover Data After Cleaning the Data Folder?
If you deleted important files from /data, try: Restore from the TWRP backup (if you did it before cleaning). Use programs like DiskDigger or EaseUS MobiSaver (efficiency is low, since /data is often encrypted); Restore synchronized data from Mi Cloud (contacts, notes, photos). To restore game saves (for example, Genshin Impact) contact the developer support - some games link progress to a Google or Mi Account.
๐Ÿ”„ What to do if the phone does not turn on after cleaning the Data?
If the device is stuck on the MI logo or gone to bootloop: Try logging into the Fastboot (Loudness down + Power) and execute the command: fastboot erase cache If it doesn't help, run the device through the Mi Flash Tool (you'll need an unlocked bootloader). For models with a locked bootloader, contact the Xiaomi service center - self-interference can void the warranty.
๐Ÿ“ก Why does the Data folder take up a lot of space again after being reset via Fastboot?
This is normal, after a reset, the system: Restores factory applications (Bloatware from Xiaomi). Downloads MIUI updates (can take up to 1-2 GB). Creates new logs and cache to optimize work. To reduce occupied space: Remove unnecessary system applications via ADB: adb shell pm uninstall -k --user 0 com.mi.globalminusscreen Disable automatic updates download in Settings โ†’ About Phone โ†’ System Update.