Computer >> Computer tutorials >  >> System >> Windows Server

Windows Update Stucks at Copying Packages to the Update Cache

I came across a strange problem when installing updates on Windows Server 2016. My host received updates from a WSUS server, tried to install them automatically, but stuck on several percent. Wuaserv restart, server restart, error search in WindowsUpdate.log were useless.

I tried to download the cumulative update manually from Windows Update Catalog and install the MSU update package using WUSA (Windows Update Standalone Installer). But the WUSA installer stuck each time on Copying packages to the Windows Update cache. The update installation was endless…

Windows Update Stucks at Copying Packages to the Update Cache

I managed to solve the problem by resetting the local Windows Update cache. Open the elevated command prompt and run the commands below:

net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver

Then make sure that wuaserv process is stopped and has not hung. It is easier to check the process status using the following PowerShell code:

$id = Get-WmiObject -Class Win32_Service -Filter "Name LIKE 'wuauserv'" | Select-Object -ExpandProperty ProcessId
$process = Get-Process -Id $id

If the process is running, stop it:

$process| Stop-Process

Windows Update Stucks at Copying Packages to the Update Cache

del /f /q "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
del /f /s /q %SystemRoot%\SoftwareDistribution\*.*
del /f /s /q %SystemRoot%\system32\catroot2\*.*
del /f /q %SystemRoot%\WindowsUpdate.log
net start wuauserv
net start cryptSvc
net start bits
net start msiserver

After cleaning the cache, run the update search. Make sure that Windows updates now are installed correctly. Most likely, the solution to clear the cache when the installation of updates hangs will also be effective in other versions of Windows (Windows 10, Windows Server 2019, etc.).

There was another case where Windows Server 2016 was unable to download updates through a proxy.