How to Delete All Files from Xiaomi Phone: 5 Verified Ways

Deleting all files from a Xiaomi phone is a challenge that every user faces when selling a device, transferring it to another person or after being infected with viruses. But simply deleting photos and apps through a file manager does not guarantee complete cleanup: residual data can be recovered using special programs, and Mi Account and Google accounts can remain tied to the device. In this article, we will discuss all the official and hidden ways to erase information from Xiaomi without the possibility of recovery, including resetting via Recovery, formatting internal memory and cleaning through Fastboot.

Xiaomi smartphones (including the Redmi series, POCO, Mi) feature a proprietary shell MIUI, which complicates the process of complete deletion of data. For example, even after resetting through the settings, some system files and the cache of applications can remain in the /data section. In addition, if you plan to sell the phone, it is not enough to simply erase files: you need to untie the device from the Xiaomi account through the official website, otherwise the new owner will not be able to activate the smartphone.

In this instruction, we will consider:

  • πŸ”„ Reset to factory settings via settings menu and Recovery.
  • πŸ—ƒοΈ Formatting internal memory (including hidden partitions).
  • πŸ”§ Cleaning through Fastboot (for advanced users).
  • πŸ”’ Remove the Mi Account before selling.
  • ⚠️ What to do if your phone is locked or not turned on.

1. Preparation for data deletion: what to do before the reset

Before you start cleaning, follow the steps to avoid losing important information and account issues:

  1. Back up. Use built-in Settings β†’ About Phone β†’ Backup or third-party services like Google Drive. Note: MIUI backup does not store some applications’ data (like WhatsApp or Telegram – they need to be exported separately).
  2. Delete accounts. Go to Settings β†’ Accounts and sync and delete all associated Google, Mi Account, Samsung (if any) and social media profiles. This will prevent the device from being blocked after the reset.
  3. Untie the device from Mi Account. Go to account.xiaomi.com, select your phone from the device list, and click Delete. Without this step, the new owner will not be able to activate the smartphone!

If you sell a phone, be sure to unblock Mi Account. Otherwise, the buyer will face a login / password request when you first set up, and unlocking through Xiaomi support can take up to 30 days.

Create a backup in MIUI or Google Drive

Delete all accounts (Google, Mi, social networks)

Untie the device from Mi Account on the official website

Get out. SIM-card and memory card (if any)

Charge your phone at least 50 times%-->

⚠️ Warning: If you forget your Mi Account password, restore it to reset. Once your phone is cleaned, it will be more difficult to restore access to your account - you will need confirmation through a linked number or email.

2. Method 1: Reset to factory settings via MIUI settings

The easiest method is to use the built-in reset feature.It's suitable if the phone is turned on, you have access to the settings menu, and you don't plan to sell the device (e.g., just want to clean it up for personal use).

Instructions:

  1. Open Settings β†’ About the phone β†’ Reset settings.
  2. Select β€œErase All Data” (not to be confused with β€œReset” – these are different options!).
  3. Enter. PIN-code or pattern lock, if requested.
  4. Confirm the action by clicking β€œDelete everything”.

It takes 5-15 minutes, and when you restart, it's like new, but:

  • πŸ”Ή Not all data is permanently deleted. /data You can recover it with programs like Dr.Fone or DiskDigger.
  • πŸ”Ή System updates remain. MIUI will not be removed from the factory, will remain the one that was installed at the time of the dumping.
  • πŸ”Ή Mi Accounts can stay tied, unless you untie them in advance, the new owner won't be able to use the phone.

πŸ’‘

If the phone asks you to enter the old Mi Account password after the reset, you haven't untie the device from your account. Solution: go to account.xiaomi.com from another device and remove the phone from your associated device list.

Method 2: Hard Reset via Recovery Mode (for locked phones)

If the phone is not turned on, locked with a pattern lock or password, or got stuck on the MI logo, use Recovery mode. This method works on all Xiaomi models, including Redmi Note 10/11/12, POCO X3/F3, Mi 11/12.

Step-by-step:

  1. Turn off your phone. If it's frozen, press the power button for 10 to 15 seconds.
  2. Press the button combination to enter Recovery: For most models: Volume up + Power. For older smartphones (until 2019): Volume up + Volume down + Power.

Mi

Recovery

Use volume buttons for navigation and power button to select the item.

Wipe Data β†’ Wipe All Data

Factory Reset

Confirm

Reboot β†’ Reboot to System

If you don't have Wipe All Data in the Recovery menu, you have custom firmware installed (like LineageOS), and then use Factory Reset or Format Data.

⚠️ Note: Some Xiaomi models (e.g. Redmi Note 8 Pro) may require you to enter a Mi Account password after resetting via Recovery, even if you untie it.This is due to the Mi Cloud Lock feature. Solution: Before reset, disable the Find Device option in your account settings.

What happens if the Recovery Mode does not open?
If the button combination does not work, try: 1. Connect the phone to charge for 10-15 minutes, then try again. 2. Use another combination (for example, for POCO F1 you need to pin Volume down + Power). 3. Install the official software through the Mi Flash Tool (instructions in the section about Fastboot).

Method 3: Complete formatting of internal memory (for advanced)

If you want to be guaranteed to delete all data without recovery, including system files and cache, use Fastboot formatting.This method requires a computer and command knowledge, but provides complete cleaning of all partitions, including /data, /cache and /system.

What you need:

  • πŸ–₯️ Computer with Windows/Linux/macOS.
  • πŸ”Œ Cable USB (preferably original).
  • πŸ“₯ Utility. ADB & Fastboot Tools (you can download from the official Android website).
  • πŸ”“ Unlocked bootloader (if the phone is new, it must be unlocked via the Mi Unlock Tool).

Instructions:

  1. Install ADB & Fastboot Tools on your computer.
  2. Turn on the phone Developer Mode (7 times click on the build number in Settings β†’ About Phone) and activate Debugging over USB.
  3. Connect the phone to your computer and execute in the command line: adb reboot bootloader The phone will reboot to Fastboot mode.
  4. Check the connection command: fastboot devices must display the serial number of the device.
  5. Run full formatting: fastboot erase userdata fastboot erase cache fastboot format:ext4 userdata fastboot format:ext4 cache
  6. Reboot the phone: fastboot reboot

After this procedure, the phone will be completely cleaned, including:

SectionWhat's removedIs it being restored?
/dataAll user files, applications, settings❌ No.
/cacheTemporary files and application cache❌ No.
/systemMIUI system files (if you use the format system)⚠️ Partially (requires flashing)

⚠️ Note: The fastboot erase and fastboot format commands permanently delete data. /boot), The phone may stop turning on. Use this method only if you are confident in your actions!

Reset via MIUI settings

Hard reset via Recovery

Formatting via Fastboot

Never cleaned it completely.-->

5. Method 4: Delete data via Mi Flash Tool (for "bricks")

If the phone doesn't turn on at all (called a "brick"), but the computer detects it in Fastboot or EDL mode, you can use the official Mi Flash Tool, which not only cleans the data, but also reflashes the phone to the factory version of MIUI.

What you need:

  • πŸ–₯️ Windows computer (7/10/11).
  • πŸ“₯ Mi Flash Tool (download from the official website).
  • πŸ“¦ Firmware for your model (choose the Fastboot version, not Recovery).
  • πŸ”Œ Cable USB (preferably original).

Instructions:

  1. Install the Mi Flash Tool and unpack the firmware into a folder without Cyrillic characters.
  2. Turn off the phone and put it in Fastboot mode (clip Volume Down + Power).
  3. Connect your phone to your computer and start the Mi Flash Tool.
  4. Click Select and point the way to the firmware folder.
  5. At the bottom, select Clean All (full clean) or Clean All and Lock (clean + lock bootloader).
  6. Press Flash and wait until it is completed (5-10 minutes).

Once flashed, the phone will be as new as the factory version of MIUI, and all data, including the Mi Account link, will be deleted.

πŸ’‘

Use Clean All and Lock mode only if you plan to sell the phone, which blocks the bootloader, making it harder for the new owner to re-unblock.

Method 5: Cleaning through service codes (hidden MIUI functions)

MIUI has hidden service codes that allow you to reset or clear individual partitions without full formatting, which don’t work on all models, but can be useful in emergency situations.

List of working codes for Xiaomi:

  • πŸ”’ ##7780## - soft reset (deletes application and settings data, but does not touch media files).
  • πŸ”’ *2767*3855# β€” Full reset (analogue of Wipe Data in Recovery).
  • πŸ”’ ##4636## - Test menu (you can clear the cache and data of individual applications).

How to use:

  1. Open the Phone app.
  2. Enter the code as a phone number and press the call.
  3. Confirm the action if a request appears.

⚠️ Attention: Code *2767*3855# It permanently deletes all data, including files on internal memory. It doesn't require confirmation, so enter it carefully!

7.What to do after cleaning: check and setup

After resetting or formatting, follow a few steps to make sure all data is deleted and the phone is ready to use:

  • πŸ” Check the memory. Connect the phone to the computer and make sure the folders are in place. DCIM, Downloads, Pictures empty.
  • πŸ”„ Update. MIUI. Go to Settings. β†’ Update the system and install the latest firmware version.
  • πŸ”’ Set up the protection. Set up a new one. PIN-code or pattern lock, enable data encryption (Settings) β†’ Additionally. β†’ Encryption).
  • πŸ“± Reactivate your Mi Account. If you have the phone, link it to your account.

If you sell a phone, don't sign in to Mi Account after reset! just hand the device over to the buyer - they have to activate it under their account.

πŸ’‘

To check if your phone has any traces of old data, install the DiskUsage app from Google Play, which will show you which files are taking up space on internal memory.

FAQ: Frequent questions about data deletion with Xiaomi

❓ Can data be recovered after full formatting via Fastboot?
No. The fastboot erase userdata and fastboot format userdata commands permanently delete data by overwriting partitions. Unlike a normal reset via settings, there are no traces left that can be recovered by programs like Recuva or Dr.Fone.
❓ Why does the phone ask for an old Mi Account password after a reset?
This means that the device is still tied to your Xiaomi account.Solution: Go to account.xiaomi.com from your PC. Under Devices, find your phone and click Delete. Wait 24 hours (sometimes it takes time to sync). Reset your phone. If it doesn't help, contact Xiaomi with proof of purchase.
❓ How to delete data from Xiaomi phone if it is not powered on and charging?
If the phone doesn’t respond to charging and doesn’t even turn on in Fastboot, options are limited: πŸ”Œ Try another cable and power supply (preferably original). πŸ”‹ Leave your phone on charge for 1-2 hours, then try logging in to Recovery. πŸ› οΈ If nothing works, contact the service center, there may be a problem in the hardware (for example, the power board burned), in such cases, data can only be restored using specialized equipment (for example, the data can be recovered by the use of special equipment, JTAG), But it's expensive and not always possible.
❓ Can you delete data from Xiaomi via a computer without Fastboot?
Yes, but with reservations: If the phone turns on and you have access to files, connect it to your PC in MTP mode and manually delete all folders. If the phone is locked but is determined by a computer, you can use programs like Android Multi Tools to reset the pattern lock (but this will not delete all data).
❓ How to remove data from memory card (SD) Xiaomi?
The memory card is formatted separately from the internal memory, and you can do this in two ways: via phone settings: Settings β†’ Memory β†’ SD card β†’ Format. Through the computer: insert the card into the card reader and format it in FAT32 or exFAT format. If the card is used as internal memory (Adoptable Storage function), it can only be formatted through the phone reset to factory settings.