sodcalculator

10 Tech How-To

Fix 0x80070002 0x20009 Installation Failed

Guide 10-12325 · Updated · Step by step

The error 0x80070002 0x20009 appears when a Windows update or software installation fails and the system attempts to roll back the changes. The fix is to clear the Windows Update cache, repair system files, and then retry the installation after a clean boot. Below are the exact steps and background to resolve this error permanently.

What Causes Error 0x80070002 0x20009

This error code combines two distinct signals. The first part, 0x80070002, is a common Windows error meaning “The system cannot find the file specified.” The second part, 0x20009, is an internal update engine code that often indicates a problem during the rollback phase of an installation. When an update or app installer fails mid-way, Windows tries to undo the partial changes. If the rollback itself cannot locate a required file or registry key, you see this combined error.

Typical triggers include:

  • Corrupted or missing files in the Windows Update cache (C:\Windows\SoftwareDistribution)
  • System file corruption from a previous failed update or disk error
  • Third-party antivirus or security software interfering with the installation
  • Insufficient disk space, especially on the system drive
  • Pending updates that conflict with the new installation

Step-by-Step Fix for 0x80070002 0x20009

Work through these steps in order. Stop after each one and try the installation again—most users resolve the issue at step 2 or 3.

  1. Run Windows Update Troubleshooter. Go to Settings > System > Troubleshoot > Other troubleshooters, select Windows Update, and run it. This automatically resets some update components.
  2. Clear the Windows Update cache. Open Command Prompt as administrator and run the following commands one by one:
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
    Then rename the cache folders:
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 catroot2.old
    Restart the services with the same commands but replacing stop with start.
  3. Run System File Checker and DISM. In the same Command Prompt, run sfc /scannow. After it finishes, run DISM /Online /Cleanup-Image /RestoreHealth. Reboot after both complete.
  4. Perform a Clean Boot. Press Win+R, type msconfig, go to the Services tab, check “Hide all Microsoft services,” then click “Disable all.” In the Startup tab, open Task Manager and disable all startup items. Reboot and try the installation again.
  5. Check disk space. Ensure at least 20 GB free on the drive where Windows is installed. Use Disk Cleanup to remove temporary files if needed.
  6. Manually reset Windows Update components. If the above fails, download the “Windows Update Troubleshooter” from Microsoft’s official site and run it, or use the “Reset Windows Update Tool” script from a trusted source. This re-registers all update DLLs and resets policies.

Understanding the Rollback Operation

When an installation fails, Windows creates a restore point or uses the existing one to revert changes. The rollback operation is supposed to restore the system to its pre-installation state. The error 0x20009 specifically indicates that the rollback process encountered a problem—often because a file that was backed up during installation is missing or unreadable.

This is why simply retrying the installation usually fails again: the same corrupted file or missing registry key causes the same rollback failure. Cleaning the update cache and repairing system files addresses the root cause rather than the symptom.

Common Misconceptions About This Error

Many users believe that error 0x80070002 0x20009 means their hard drive is failing or that they need to reinstall Windows. Neither is usually true. The error is almost always software-related, specifically tied to the Windows Update components. Reinstalling Windows is a last resort and should only be considered after all other steps fail.

Another misconception is that third-party antivirus is never the cause. In practice, security software with real-time protection can lock files that the update process needs to modify, triggering both the file-not-found error and the rollback failure. Temporarily disabling such software (not uninstalling) during the update is a valid troubleshooting step.

Preventing Future Occurrences

After resolving the error, take these steps to reduce the chance of it returning:

  • Keep Windows Update enabled and set to automatic.
  • Regularly run Disk Cleanup and remove temporary files.
  • Ensure your system drive has at least 15-20% free space at all times.
  • Update drivers and firmware from official manufacturer websites.
  • Create a system restore point before installing major updates or software.

When to Seek Professional Help

If you have tried all the steps above and the error persists, the issue may be deeper—such as a failing hard drive or corrupted Windows installation. In that case:

  • Back up your important files immediately.
  • Run a disk check with chkdsk /f /r from an elevated command prompt (this requires a reboot).
  • Consult a qualified technician or use Windows Recovery Environment to perform a repair install.

A repair install (using the Windows installation media and selecting “Repair your computer”) can fix system corruption without deleting personal files. This is a more targeted solution than a full reinstall.

Frequently Asked Questions

Will this error damage my files?

No, the error itself does not delete personal files. It only prevents the installation from completing. However, if the rollback fails repeatedly, it could leave the system in an unstable state, so it is wise to back up important data before extensive troubleshooting.

Can I ignore this error and continue using my computer?

You can, but the failed update may leave the system partially updated, which can cause other issues like crashes or security vulnerabilities. It is best to resolve the error as soon as possible.

Does this error occur only on Windows 10/11?

It can occur on any modern Windows version, including Windows 7, 8, 10, and 11. The troubleshooting steps are similar across versions, though menu names may differ slightly.

How long does the fix take?

Clearing the cache and running SFC/DISM can take 15-30 minutes depending on your system speed. The clean boot and manual reset steps add another 10-20 minutes. Most users complete the entire process in under an hour.

Is it safe to delete the SoftwareDistribution.old folder?

Yes, after you confirm the update installs successfully, you can delete that folder to reclaim disk space. It only contains old update files that are no longer needed.

Why does the error mention “prepare rollback operation”?

This phrase appears in the Windows Event Viewer or setup log when the system is preparing to undo a failed installation. It is a normal part of the process, but the error code indicates that the rollback itself failed, which is what you are fixing.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →