The Windows operating system features a couple of built-in repair tools. When you use one of these tools, such as the System File Checker utility, you may encounter the "there is a system repair pending which requires a reboot to complete" error.

This error is triggered if a repair is pending from a previous attempt. To fix the error, you can perform a quick system restart. If the error persists, here are a few troubleshooting steps to fix it in the Windows operating system.

1. Remove the Pending.XML File

You may not be able to execute the System File Checker utility when your system is in the pending reboot state. If a reboot doesn’t help, you can manually delete any pending.xml file in the WinSxS folder to fix the error.

To delete the Pending.xml file:

  1. Press Win + E to open File Explorer
  2. Next, navigate to the following location:
    C:\Windows\WinSxS
  3. Here, search for a pending.xml file.
  4. If found, rename, or delete the file.
  5. Once deleted, restart your PC, and run the System File Checker tool to see if the error is resolved.

If you receive a file ownership error when deleting the file, you will need to take ownership of the WinSxS folder and try again.

2. Run the DISM Tool

DISM (Deployment Image Servicing and Management) is a command-line Windows utility to repair and fix your system image. In this case, you can use the restorehealth, and revertpendingactions parameters of thee DISM utility to fix the error.

To run the DIMS tool:

  1. Press the Win key, and type cmd.
  2. Next, right-click on Command Prompt and select Run as administrator. Click Yes when prompted by User Account Control.
  3. In the Command Prompt window, type the following command and hit Enter:
    DISM.exe /Online /Cleanup-Image /Restorehealth
  4. This command requires an active Internet connection to work as DISM will download the necessary files from the Windows Update Service.
  5. Once the process is complete, restart your PC and run the SFC scannow command to see if the error is resolved.

3. Run DISM’s RevertPendingAction Parameter

If you are unable to boot into Windows, you can use the Windows Recovery Environment (WinRE) and run the revertpendingaction command to fix the error.

There are many ways to boot into Windows Recovery Environment. But for this guide, we will use the classic F11 key method.

  1. Power off your laptop.
  2. Next, press the Power button to turn on the laptop and start pressing F11 on your keyboard to boot into Windows Recovery Environment. If the F11 key doesn’t work, try the F9 or F12 key instead.
  3. Next, in the Troubleshoot screen, click on Advanced Options.
  4. Next, click on Command Prompt.
  5. In the Command Prompt window, type the following command and hit Enter:
    DISM.exe /image:C:\ /cleanup-image /revertpendingactions
  6. If you have installed the OS in any other partition, make sure to change the drive letter (C:\) in the above command accordingly.
  7. Next, wait for the process to complete. If successful, the output will show the operation completed successfully message.
  8. Next, close the Command Prompt window and restart your PC. After the restart, run the sfc /scannow command in the elevated Command Prompt and check if the error is resolved.

4. Remove the Reboot Pending Entry in Windows Registry

If deleting the pending.xml file didn’t help, you can delete the Reboot Pending key to remove any pending restart information and allow the system to run the System File Checker tool.

Note that modifying your registry entries involves risk. Make sure to create a restore point before proceeding with the steps below.

  1. Press Win + R to open Run.
  2. Type regedit and click OK to open the Registry Editor. Click Yes when prompted by User Account Control.
  3. Next, navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
  4. Next, locate and right-click on the RebootPending key and select Delete.
  5. Click Yes to confirm the action.

If you see the cannot delete key error, you'll need to take full ownership of registry keys in Windows and then try again to delete the key.

A Clean Install May Be Your Last Resort

If your system still fails to boot, a clean install may be your last resort. A clean install may be necessary if your system image is damaged beyond repair.

Alternatively, consider performing a repair upgrade if your system is in a bootable state. This will allow you to reinstall the OS without deleting your apps and files.