Clean Update Log on Xiaomi Redmi 9: A Complete Guide with Risks and Life Hacks

The update log on Xiaomi Redmi 9 is a hidden system file that stores information about all installed firmware, security patches and minor updates. Over time, it grows to several hundred megabytes, taking up precious space in the /data partition and slowing down the system. But there is a caveat: the manufacturer did not provide a regular way to clean it through the settings menu.

Why is it important? A clogged log can cause errors when installing new updates (code) ERROR_DOWNLOAD_FAILED), This is especially true for users who have not reset their phones to factory settings in years, and in this article, all the working cleaning methods, from safe to extreme, with an analysis of the consequences of each one.

What is a Update Log and Why You Should Clean It

Update log (or update log) is the database update.db and ota_package.xml, which are stored in a protected section /data/miui/ota. They contain:

  • πŸ“ List of all installed firmware (including beta versions)
  • πŸ”„ Logs of successful and unsuccessful update attempts
  • πŸ“Š Performance metrics before/after updates
  • πŸ”‘ Hash sums downloaded OTA-packet

On the Redmi 9 (model M2003J15SC), these files can take anywhere from 50 MB to 1.2 GB, depending on the number of updates.

Problem.Reason.Decision
Error "Insufficient Memory" when updatingThe journal takes place in /dataCleaning through ADB or Recovery
Hanging on the MI logo after the updateConflict between old and new entries in update.dbManual cleaning or discharge
The "Update" appendix does not openDamaged files in /miui/otaDelete folder via TWRP

Critical information: On the Redmi 9 with MIUI 12.5+, the update log is automatically archived every 30 updates, but the archives are NOT deleted - they are accumulated in /data/miui/ota/backup.

⚠️ Attention: Deleting the update log does not roll back firmware, but can reset your network and Xiaomi account settings.Untie your device from Mi Account in Settings before cleaning β†’ Xiaomi account, otherwise you risk blocking your phone.

Method 1: Cleaning through the "Storage" menu (without root)

The safest method, but only works if the log takes less than 300 MB. Suitable for users who have updated no more than 1 time in 2 months.

Instructions:

  1. Open the Settings β†’ Storage
  2. Click "Clean" in the "System Data" section
  3. Select "Update logs" (may be called "Updater Data")
  4. Confirm the cleanup and restart the phone

This method only removes the update cache, but does not touch the main files of update.db. Efficiency: frees up 100-200 MB.

Backup in Mi Cloud| Disable two-factor authentication | Charge up to 50%+| Remember the current firmware version-->

⚠️ Note: If after cleaning in Settings β†’ The phone. β†’ The software update says, "No updates" -- that's okay. The data will be recovered after the next successful update.

Method 2: Removal via ADB (for advanced)

The method requires a computer and enabled USB debugging, allowing you to delete all log files, including hidden archives.

Step-by-step:

  1. Install ADB Tools on PC
  2. In the phone, activate Settings β†’ About Phone β†’ MIUI version (click 7 times)
  3. Return to Settings β†’ More β†’ For developers and enable USB Debugging
  4. Connect your phone to your PC and execute the commands:
adb shell


su




rm -rf /data/miui/ota/*




rm -rf /data/miui/ota/backup/*




exit




exit

If the su command doesn't work, you don't have root rights, in which case use an alternative command without a superuser:

adb shell pm clear com.android.updater

This method frees up to 1 GB of space, but has risks:

  • πŸ”΄ Reset network settings (Wi-Fi, Bluetooth)
  • πŸ”΄ Losing update history in Mi Cloud
  • πŸ”΄ There may be errors in the next update.
What if the ADB can’t see the device?
1. Check the drivers (install Mi) PC Suite) 2. Try another USB-cable (original from Xiaomi) 3. Include in the developer "Debugging by" USB (Security settings” 4. Restart your phone and PC

Method 3: Recovery Mode (without data loss)

It works on all versions of MIUI, including custom firmware. It doesn't require root, but it deletes all temporary update files.

Instructions:

  1. Turn off the phone.
  2. Press Power + Volume Up Before the Mi Logo Appears
  3. Select a language and go to Connect with MI Assistant
  4. Click Clear Update Cache (could be called Clear Update Cache)
  5. Confirm the action and restart.

This method cleanses:

  • πŸ“‚ folder /cache/ota (time-file)
  • πŸ“‚ Cash of the Updater app
  • πŸ“‚ Failed update packages

It does not delete the main log in /data, but solves 80% of installation errors problems. After the procedure, it is recommended to manually check the updates in Settings β†’ About Phone β†’ Software Update.

Once a week | Once a month | Only in case of critical errors | Never update-->

Method 4: Manual cleaning via TWRP (for root users)

The most radical method, which requires an unlocked bootloader and installed TWRP Recovery, allows you to remove all traces of updates, including system tags.

Step-by-step:

  1. Download to TWRP (Nutrition + Volume Up)
  2. Go to Advanced β†’ File Manager
  3. Delete folders: /data/miui/ota /cache/ota /data/dalvik-cache (optional)

Wipe β†’ Advanced Wipe

Dalvik / ART Cache

Reboot.

Advantages of the method:

  • 🧹 Complete cleaning of all traces of updates
  • πŸš€ Acceleration of the system by 15-20%
  • πŸ”§ Fixing Bootloop Errors After Failed Updates

⚠️ Note: If after cleaning through TWRP The phone is stuck on the boot, which means that critical firmware files have been deleted. Restore them via Fastboot with the command: fastboot flash system system.img (file system.img It is taken from the official firmware for your model)

Method 5: Alternative method through Mi Flash Tool (for experienced)

This method is suitable if the update log has damaged system files and the phone does not boot or constantly restarts. USB-cable.

Instructions:

  1. Download the official firmware for Redmi 9 (select your region version)
  2. Unpack the archive in a folder without Cyrillic characters
  3. Install the Mi Flash Tool
  4. Download your phone to Fastboot (Power + Volume Down)
  5. In Mi Flash Tool, select the firmware folder and press Clean all and lock.
  6. Wait until the end (10-15 minutes)

This method completely reinstalls the system, including cleaning:

  • πŸ“± Journal of updates
  • πŸ“± Cash app.
  • πŸ“± User data (photos, contacts – remain if not selected Clean all)

After the procedure, the phone will look like new, but:

  • πŸ”„ You will need to re-link your Mi Account.
  • πŸ”„ Wi-Fi and Bluetooth settings will reset
  • πŸ”„ You'll have to reset your fingerprint.

πŸ’‘

Before using the Mi Flash Tool, check the firmware version in the file. flash_all.bat. If you have an older version, your phone may be locked (anti-rollback protection).

Frequent mistakes and their solutions

Even after a successful log cleanup, problems can arise, and here are the most common ways to fix them:

Mistake.Reason.Decision
Error 7 when installing the updateDamaged files in /cacheClear the cache through Recovery
"Failed to verify the update"There's no file. ota_package.xmlDownload the firmware manually and install through Select file
Cyclical rebootVersion conflict in update.dbReset via Fastboot with a flag --lock
"Insufficient memory" when downloadingThe journal takes place in /dataUse ADB or TWRP for deep cleaning

If after cleaning the log, the phone stopped seeing updates:

  1. Check your internet connection (updates are only downloaded via Wi-Fi on MIUI 12+)
  2. Reset network settings in Settings β†’ SIM-maps and mobile networks β†’ Resetting network settings
  3. Install manual firmware through Settings β†’ About Phone β†’ Software Update β†’ Three Dots β†’ Select an Update File

πŸ’‘

If after all the manipulations, the phone still does not update, check the status of Xiaomi servers on the Downdetector website. Often the problems with updates are due to server overload, not your device.

Can I clean the update log without a computer?
Yes, but with limitations. You can clear the cache without a PC through the Storage menu (Method 1) or Recovery Mode menu (Method 3), but you will need root rights or ADB to clean /data/miui/ota completely.
Why did the phone slow down after cleaning the log?
This is a temporary effect. The system rebuilds the Dalvik cache after you delete the update files. Wait 10-15 minutes or restart the phone manually. If the brakes are left, clear the app cache in Settings β†’ Storage β†’ Clear the cache.
Will the warranty be reset after the log is cleaned?
Not unless you're using root or an unblocked bootloader. Cleaning through ADB or Recovery doesn't affect warranty status. Except if you manually damage system files.
How to check the size of the update log?
Install a file manager with root access (like FX Explorer) and go to /data/miui/ota. The folder size will be the size of the log. You can't see this folder without root.
Can I restore a deleted update log?
No, it's impossible. The journal is not backed up by the system, but after the next successful update, it will start to form again from a clean state.