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 /pid 1234
from an admin command prompt, where 1234 is the PID you found.
Is it normal that after doing this procedure, the next time you check for windows updates with sconfig will take 'a little bit longer' as it needs to recheck which updates system has it already installed?
Yes, this is quite normal as all the caches and download folders have been cleared by the procedure. So all those have to be initialised and populated again. So it will take longer the first time.
Will this work on a consumer version of Windows 11?
Yes, this should work on Windows 11, any edition.
Can confirm that this is also effective on Windows 10 2016 LTSB. Thanks!
Will this work on a 2012 R2 Domain Controller?
Yes, this will work.
Thanks a lot !!!
This article resolved my issue for Windows Server 2016.
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.
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.
Yes. @wmhtheitpro your comment, surfacing this post, saved my bacon just now. Great post. Great comment. Thanks!
Thanks @wmhtheitpro
I have updated the article to reflect the /pid switch instead of /p
Thank you! Saved my Server 2016 aswell
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.
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.
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
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.
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.
I was in the same boat as Tim below me. These steps got me unstuck. Appreciate this post saving me time!
Really helpful. Needed this to fix an issue caused by Feb 2021 patches for the servicing stack that broken Server 2016 updates. Thanks.
Thanks! Worked for me too. Installation Complete.
Thank you! This solved problems on a set of our Windows 2012 R2 servers as well!
Thanks. Solved problem I was having with a 2016 server I was having a nightmare with
It really works! Thanks
Thanks for this solution, it really helped me!
Thank you so much for this! It worked for me on Windows 10 Pro.