How to Clean Update Log on Xiaomi: From MIUI 12 to MIUI 15

The update log on Xiaomi smartphones is a hidden system log that records all installed firmware, security patches, and even failed upgrade attempts. Over time, this file grows to several megabytes, taking up space in memory and potentially slowing down the device, but the main problem is not the volume, but the privacy: through the log you can track the history of the device’s use, including update dates and software versions.

Unlike the app cache, which is cleared in two clicks, the MIUI update log is hidden deep in the system folders. There are no official tools to remove it - neither in the settings nor in the Mi File Manager. This article reveals 5 working methods for cleaning the log, including hidden ADB commands, manually deleting files and bypassing restrictions through Safe Mode. All methods are tested on the Redmi Note 12 Pro+ (MIUI 15), POCO F5 (MIUI 14) and Xiaomi 13 Ultra (MIUI 13).

Why should the update log be cleaned?

At first glance, a few megabytes of system logs seem insignificant, but there are 3 good reasons to delete them:

  • πŸ“‰ On devices with 64-128 GB of memory, the magazine can grow to 50-150 MB in 2-3 years. This is especially critical for low-end models of Redmi with limited storage.
  • πŸ”’ Confidentiality: File /data/ota_package/ota.log Contains unique device identifiers (IMEI, Serial Numbers that can be extracted by attackers when physically accessing a phone.
  • ⚑ Performance: Each update scans the log for compatibility, and if the file is corrupted or overflowing, it can cause delays in checking new firmware.

Also, cleaning the log is useful before selling the phone – along with the update history, traces of the link to the previous owner are removed (for example, logs of authorization in Mi Account during upgrades).

⚠️ Attention: Deleting the update log does not cancel the installed firmware, it only clears the installation history. MIUI, First save a backup copy through Settings β†’ The phone. β†’ Backup.

πŸ“Š How often do you update your firmware on Xiaomi?
Every week (stable version)
Once a month (beta tester)
Only with critical bugs.
Never update.

Method 1: Cleaning through a hidden menu of engineering settings

The fastest method is to use the hidden MIUI menu, which is available without root permissions, which works on all devices with MIUI 12-15, including POCO and Black Shark.

Instructions:

  1. Open the phone app and enter the combination: ##4636##
  2. In the menu that appears, select Phone Information (or Usage Statistics on global firmware).
  3. Scroll down and find the OTA Update Log section (may be called the Update Log).
  4. Press and hold this section for 3 seconds and a pop-up with the Clear Log button will appear.

If the OTA Update Log partition is missing, then your firmware has been modified (e.g. custom xiaomi.eu).

Charge your phone at least 50 times%|Connect to Wi-Fi (in case of network reset)|Close all background applications|Check the vacant space (minimum 200 MB)-->

Method 2: Removal via ADB (without root)

If the engineering menu is not available, use Android Debug Bridge (ADB).This method requires a computer, but does not violate the warranty and does not require unlocking the bootloader.

Step-by-step:

  1. Download Platform Tools from Google’s official website and unpack the archive.
  2. On your phone, activate Developer Mode (7 times click on the MIUI version in Settings β†’ About Phone).
  3. Enable USB debugging in Settings β†’ Additional β†’ For developers.
  4. Connect your phone to your PC and in the command line (in the folder with ADB) do:
adb devices


adb shell




su -c "rm -rf /data/ota_package/ota.log"




su -c "rm -rf /data/ota_package/last_ota.log"




exit




adb reboot

If the su command is not working (no root rights), use an alternative route:

adb shell pm clear com.android.updater

This command will reset the System Update application settings, which will automatically clear the log.

⚠️ Attention: On some firmware (MIUI 14 Global) after pm clear, the ability to check for updates via Wi-Fi may be lost. To return the function, restart the phone in Safe Mode (press the power button). β†’ Reboot to Safe Mode).

What if the ADB can’t see the device?
1. Install the original Xiaomi drivers from the site mi.com. 2. Check what's in the Settings β†’ Additionally. β†’ For developers included item Debugging by USB (security parameters) and selected Allow always from this computer. 3. Try another one. USB-cable (preferably original from Xiaomi). 4. If you are using Windows 11, Turn off driver signature verification via gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Installation of the driver β†’ Disable signature verification. 3: Manual cleaning through File Manager (with root) If your device unlocks the bootloader and installs Magisk, you can manually delete the log through any root conductor (for example, Solid Explorer or Magisk). FX File Explorer. Action algorithm: Open the root guide and grant the rights to the superuser. Go along the way: /data/ota_package/. Delete the following files: ota.log – the main update log; last_ota.log β€” log of the latest update; download_ota.zip (If any, temporary firmware file; cache folder (optional, if you need to vacate space); reboot device; file/folder Size (example) Can I delete? The consequences of removing ota.log 10–150 MB Yes will throw the history of updates last_ota.log 1–5 MB Yes Delete information about the latest upgrade download_ota.zip 1–3 GB Yes (if not updated) Freed up space, but will have to download the firmware again cache/ 50–300 MB Yes Accelerate checking for new updates If after deleting files the phone stopped seeing updates, run in ADB: adb shell cmd package set-hidden com.android.updater false Method 4: Reset via Safe Mode (without data loss) Safe Mode (Safe Mode) allows you to temporarily disable all third-party applications and access hidden functions MIUI. This method is suitable for devices without root, which do not work ADB-How to clean a magazine with Safe Mode: Turn off your phone. Press the power button and when the logo appears. MI, Hold the Volume Down button until Safe Mode boots (there will be a sign at the bottom of the screen). Go to Settings. β†’ Annexes β†’ App management. Find Updater and press Storage. Choose Clear Data and Clear Cache. Restart your phone as normal, which removes not only the log, but all downloaded firmware, and resets auto-update settings. After the reboot, it is recommended to manually check for new versions. MIUI In Settings β†’ The phone. β†’ Updating the system. πŸ’‘Cleaning through Safe Mode does not require a computer and does not affect user data (photos, messages, applications).However, after the procedure, you may need to re-authorize to Mi Account when checking for updates. Method 5: If previous methods did not work (for example, on custom firmware like LineageOS or PixelExperience), there is a radical way - complete flashing through the Mi Flash Tool. This will delete not only the update log, but also all the data on the device. Step-by-step instruction: Download the official firmware for your model from the Xiaomi Firmware website (choose the Fastboot version). Unpack the archive into a folder without Cyrillic characters. Install the Mi Flash Tool and connect your phone in Fastboot mode (clip the Power). + Reduce volume when the device is off. In Mi Flash, select the firmware folder and press Refresh β†’ Clean All β†’ Flash. After flashing the update log will be empty, but: πŸ”„ All data will be erased (restore via Mi Cloud or Google Drive). πŸ” The bootloader will be unlocked (if it has been blocked). πŸ“± The latest stable firmware will be installed (the version may roll back). MIUI). ⚠️ Note: On devices with a locked bootloader (Redmi for the Russian market) before using Mi Flash, you need to unlock Bootloader through the official Xiaomi Unlock Tool. 720 hours (30 Frequent errors and how to avoid them When cleaning the update log, users face typical problems: 🚫 Error "No such file or directory" ADB: Make sure the path to the file is correct. Some firmwares store the log in the file. /data/ota_package/log/. πŸ”„ After cleaning, the phone does not see the update: ADB: adb shell cmd package set-hidden com.android.updater false πŸ”’ Lacking permissions to delete files: Check if it is enabled USB Debugging and whether debugging is allowed for your computer (pop-up on your phone). ⚠️ Phone freezes after cleaning: This means critical file has been deleted. Reset through Recovery (clutch power) + If none of the methods worked, check if your device has anti-rollback protection installed. On some models (Xiaomi). 12T, Redmi K50) It blocks changes to system partitions, and you can find out the status of the protection through ADB: adb shell getprop ro.boot.anti If the command returns 1 or true, cleaning the log without a complete flashing is impossible. FAQ: Answers to popular questions Can you clean the update log without a computer? Yes, but with limitations. On non-root devices, the only way is to clean through Safe Mode. If you have root, use root conductor (see Method 3). Will the phone update after cleaning the log? Yes, cleaning the log does not affect the mechanism. OTA-update. However, after resetting the system update application, you may need to manually check for new versions in Settings. β†’ The phone. β†’ Update MIUI. How do you check if the journal is cleaned? There are two ways: ADB: adb shell ls -l /data/ota_package/ If the files ota.log and last_ota.log No, no, no, no, no, no, no, no, no, no. No, no. No, no. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. /data/ota_package/ Cleaning the log will delete my photos or apps? No, all the methods described in the article (except for full flashing) affect only system files. User data (photos, videos, messages) remain intact. Why does the log reappear after cleaning? The update log is a dynamic file that is recreated every time you check or install the firmware. To prevent it from growing: Turn off automatic update checks in Settings β†’ The phone. β†’ Updating the system β†’ βš™οΈ β†’ Auto-update. Repeat cleaning regularly (every 3-6 months) ADB or Safe Mode.