Windows 10 update stuck

On occasion Windows 10 updates get stuck. If an update has not completed over the night it is probably stuck. Open a command prompt and use these commands to stop the update service, remove the temporary update files and then restart the update service:

net stop wuauserv

net stop cryptSvc

net stop bits

net stop msiserver

ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

ren C:\Windows\System32\catroot2 catroot2.old

net start wuauserv

net start cryptSvc

net start bits

net start msiserver