Windows: Installing a Windows Update manually hangs on "Copying packages to the update cache"

I recently had a Windows 2016 server that could not install automatic updates. It always hang at some percentage and would never finish. The next step was to try to install an update (.msu file) manually. But this always hung forever at "Copying packages to the update cache".

Here is what helped me:

Start a cmd box as Administrator

Run the following commands:

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

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

This will clear the Windows Update cache and the automatic updates should work again.

Update: Some readers have commented that if the Windows Update Service (wuauserv) does not stop, kill it in Task Manager:

Look in the Services tab of Task Manager, find the PID (process ID) for Windows Update Service, then do: taskkill /f /p 1234 from an admin command prompt, where 1234 is the PID you found.

18 thoughts on “Windows: Installing a Windows Update manually hangs on "Copying packages to the update cache"”

  1. Thank you very much!! This worked for me on Server 2016. This was driving me nuts. I had tried steps from several other articles, but stopping these services, setting the Windows Updates service into Manual mode, downloading the updates I needed and manually installing them resolved the issue. Then I changed the Windows Updates service back to Automatic and downloaded/installed the remaining updates I needed.

  2. After doing a lot of reading and searching, this article comes the closest to having all of the steps required to resolve this problem! Thank you for creating this post!

    Couple of caveats to be aware of:

    @Ronin - Yep, that should be your first steps, however, they didn't work in my case.

    @Ginny - Disabling the Windows Update service and rebooting is crucial!

    @all
    - the /p switch for Taskkill didn't work. /pid does work.

    - My servers are running Internet Explorer and that wouldn't let me browse to a download folder on the server. Consequently, I used Edge on my local PC to download from the Windows Update Catalog. Then I copied them to the affected server.

    - Then install these updates one at a time, KB4589210, kb5001078 and finally kb4598243 with a reboot after each install.

    1. Yes. @wmhtheitpro your comment, surfacing this post, saved my bacon just now. Great post. Great comment. Thanks!

  3. Thanks you! Update were stuck at my 2016 servers as well, performed the MS procedure, but disabled the update service first, rebooted, than was able to stop and rename the folders. After this auto updates works again.

  4. For those who come here trying to fix Windows Server 2016 failing to update after the February 2021 servicing stack update, but then weren't sure that they could trust the actions outlined from an unofficial article and comments, see:

    https://docs.microsoft.com/en-us/windows/release-health/status-windows-10-1507#february-2021

    Microsoft advise a manual fix that uses a subset of the steps advised in this article. See steps 1, 2, and 4a from this link (also linked from the MS article above):

    https://docs.microsoft.com/en-us/windows/deployment/update/windows-update-resources#reset-windows-update-components-manually

    Hope this helps.

  5. Thank you for posting this. Like Tim, I needed this to fix an issue caused by Feb 2021 patches for the servicing stack that broke Server 2016 updates. Thanks

  6. Same as Tim, had a Win 2016 server that wouldn't download from Windows Update. Had to download the patches manually, but they still wouldn't apply. Did your commands and then manually applied the .msu files and it worked.

    One other trick for people if Windows Update service fails to stop. Look in the Services tab of Task Manager, find the pid for Windows Update Service, then do : taskkill /f /p 1234 from an admin command prompt, where 1234 is the pid you found.

    1. Another trick I had to do was DISABLE the Windows Update Service, reboot server, and then I could perform some of the cleanup, and then set Windows Update Service back to MANUAL.

  7. I was in the same boat as Tim below me. These steps got me unstuck. Appreciate this post saving me time!

  8. Really helpful. Needed this to fix an issue caused by Feb 2021 patches for the servicing stack that broken Server 2016 updates. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *