Error Code: Install Error 0x80070020

In Windows 11, the Update will fail error code 0x80070020 if the Window Update Data Store is corrupted. Try this easy fix method mentioned below.

How to fix Update Error 0x80070020?

You have to reset the Data Store in order to resolve this issue. Follow these steps to reset the Windows update data store.

Step 1 : Stop Windows service

Click Windows search -> search for services.msc -> Select “Services” App

Windows 11 Update Service a
Windows 11 Update Service a

Services app will appear, scroll down to “Windows Update” service, and click “Stop” as shown in the image given below.

Windows Update Service Stop
Windows Update Service Stop

Step 2 : Reset Windows Update Data Store

  1. Navigate to Windows 11’s C:\Windows\SoftwareDistribution\ folder
  2. Rename “DataStore” folder to “DataStore.Bak”
  3. Rename “Download” folder to “Download.bak”
Windows 11 Reset Data Store
Windows 11 Reset Data Store
C:\Windows\SoftwareDistribution\Download
C:\Windows\SoftwareDistribution\DataStore

Step 3: Restart Windows Update Service

Open the Services app and restart the Windows Update service.

Windows 11 - Windows Update Service Restart
Windows 11 – Windows Update Service Restart

Now Windows will create new DataStore and Download folders in “C:\Windows\SoftwareDistribution\

Restart your PC and try Windows update.

Windows 11 – Windows Update Reset Script

Alternatively, you can use this script to reset all components related to Windows Update.

Copy these commands, Open notepad, paste them into notepad and save it as a batch file (with “.bat” extension; for eg: “Reset-Update.bat”). Then run the script as administrator.

net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
taskkill /im wuauclt.exe /f
del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
del /s /q /f "%ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr*.dat"
cd /d %SYSTEMROOT%
del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak"
rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak"
rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak"
del /s /q /f "%SYSTEMROOT%\WindowsUpdate.log.bak"
takeown /f "%SYSTEMROOT%\winsxs\pending.xml"
attrib -r -s -h /s /d "%SYSTEMROOT%\winsxs\pending.xml"
ren "%SYSTEMROOT%\winsxs\pending.xml" pending.xml.bak
attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution"
ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.bak
attrib -r -s -h /s /d "%SYSTEMROOT%\system32\Catroot2"
ren "%SYSTEMROOT%\system32\Catroot2" Catroot2.bak
attrib -r -s -h /s /d "%SYSTEMROOT%\WindowsUpdate.log"
ren "%SYSTEMROOT%\WindowsUpdate.log" WindowsUpdate.log.bak
sc.exe sdset wuauserv D:(A;CI;CCLCSWRPLORC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOSDRCWDWO;;;WD)
sc.exe sdset bits D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;SAFA;WDWO;;;BA)
sc.exe sdset cryptsvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPWPDTLOCRRC;;;SO)(A;;CCLCSWLORC;;;AC)(A;;CCLCSWLORC;;;S-1-15-3-1024-3203351429-2120443784-2872670797-1918958302-2829055647-4275794519-765664414-2751773334)
sc.exe sdset trustedinstaller D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRRC;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;SAFA;WDWO;;;BA)
cd /d %SYSTEMROOT%\system32
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
netsh winsock reset
proxycfg.exe -d
netsh winhttp reset proxy
sc.exe config wuauserv start= auto
sc.exe config bits start= delayed-auto
sc.exe config cryptsvc start= auto
sc.exe config TrustedInstaller start= demand
sc.exe config DcomLaunch start= auto
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
net start DcomLaunch
del /s /f /q "%TEMP%\*.*"
del /s /f /q "%SYSTEMROOT%\Temp\*.*"

Windows Update Troubleshooting Guides and Tools