By Dan Gookin

Your PC might get stuck when updating Windows. The progress bar doesn’t move, and restarting Windows doesn’t fix the bad update. The solution is to purge the temporary update files, or cache, which clears the pipes and allows the update to proceed.

If you have difficulty getting an update to process, follow these steps:

  1. Open an Administrator Command prompt window.
    Press Win+X and choose Command Prompt (Admin) from the supersecret menu. Click the Yes button to proceed.
  2. Type this command:
    net stop wuauserv

    Type the three words shown here, separated by spaces. Press the Enter key when you’re done.The name of the Windows Update service is wuauserv. Upon success, you see the text

    The Windows Update service is stopping.
    The Windows Update service was stopped successfully.If the service can’t be stopped, you must boot into safe mode and attempt these steps again. But you’re not done yet! Stopping the service is only the first task. The second task is removing the stuck files.

  3. Type the command

    cd %windir%

    The command prompt changes to reflect the Windows directory (folder).

  4. Type the command
    cd SoftwareDistribution

    Don’t put a space between Software and Distribution! The SoftwareDistribution folder is where Windows updates lurk.

  5. Type the command

    del /F /S /Q Download

    Those are forward slashes and the letters F, S, and Q. This command purges the files that Windows uses to update the system. It’s okay to delete them, because the update has failed; Windows downloads them again when you’re done.With the files purged, the final step is to restart the Windows Update service.

  6. Type this command:

    net start wuauserv
    The following text confirms success:

    The Windows Update service is starting.
    The Windows Update service was started successfully.

  7. Close the Administrator Command Prompt window.

    The cool kids type the exit command.

These steps should resolve the issue: The files that Windows couldn’t use for the update are removed. Fresh files are downloaded automatically and then installed.