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.