Windows 11 upgrade error 0x8007001F: how to fix it

0x8007001F is a Win32 error code that Windows Setup shows when an upgrade or feature update fails and rolls back. Microsoft has no dedicated fix for it, so work through the usual steps: free up space, temporarily remove third-party security software, repair system files with DISM and SFC, reset the update cache, then read the Setup logs with SetupDiag to find the real cause.

Applies to:Windows 1122H2Windows 10upgrades to Windows 11
On this page

What it means

The 0x8007 at the start of 0x8007001F marks it as a Win32 error wrapped in a Windows result code, and the last four digits (001F) are the code itself. Microsoft explains this decoding on its Windows 10 upgrade error codes page. The code alone does not tell you which file, driver or device failed.

Microsoft has no dedicated article for this code, so the fixes below come from community reports and general Microsoft upgrade guidance. None is guaranteed. In the Microsoft Q&A thread on this error, no suggested fix was confirmed as the answer.

The best clue is the second code Setup often shows next to it, such as 0x8007001F - 0x3000D. The first digit of the second code is the phase (1 DOWNLEVEL, 2 SAFE_OS, 3 FIRST_BOOT, 4 OOBE_BOOT, 5 UNINSTALL). The last two digits are the operation (for example 0x0D is MIGRATE_DATA and 0x06 is REPLICATE_OC). So - 0x3000D means the failure happened during first boot while migrating data. Microsoft publishes these tables on its Windows 10 version 1607 page and says they may change in later releases, so treat them as a guide on Windows 11, not a guarantee.

Symptoms and causes

You are likely dealing with this problem if:

  • Windows Update shows "There were some problems installing updates, but we'll try again later" with 0x8007001f.
  • The Windows 11 Installation Assistant or ISO setup rolls back at some percentage and shows a pair like 0x8007001F - 0x3000D.
  • The error appears even when there is plenty of free disk space.

The usual causes, most common first:

Corrupted system files or update cache
Damaged system files, a damaged Windows Update component store or a stale download cache are among the causes listed by third-party guides.
Third-party antivirus or security software
Security software can interfere with Setup and is mentioned in both community and Microsoft Q&A reports.
Duplicate or broken user profiles
When the extended code ends in 0D (MIGRATE_DATA), profile problems can be the trigger. SetupDiag has a rule for duplicate user profiles, usually several SIDs tied to one profile.
Optional component or servicing problems
In a Microsoft SetupDiag sample, 0x8007001F appears when Setup fails to open an optional component package.
Outdated or faulty drivers and attached devices
GPU, network and storage drivers, or a misbehaving USB device or expansion card, are reported as triggers.
Low disk space or a poor connection
A third-party guide recommends over 64 GB free, which is conservative and well above Microsoft's minimum. An unstable connection during download can also cause failures.

How to fix it

Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.

1.Prepare the PC and run the troubleshooter

Easy

Removes common interference before you touch anything deeper.

  1. Free up space on drive C: (a third-party guide suggests 64 GB or more) and run Disk Cleanup.
  2. Unplug non-essential USB and external devices. Remove extra expansion cards if you have them.
  3. If you use third-party security software, turn it off temporarily or uninstall it for the upgrade. Turn it back on (or reinstall it) as soon as the upgrade finishes.
  4. Install the latest GPU and other drivers, including those under Settings > Windows Update > Advanced options > Optional updates.
  5. Run the Windows Update troubleshooter, then restart and retry.

2.Repair system files with DISM and SFC

Easy

Fixes corrupted system files, one of the reported causes.

  1. Open Command Prompt as administrator and run both commands in order.
    Command Promptrun as administrator
    dism.exe /Online /Cleanup-Image /Restorehealth
    sfc /scannow
  2. Restart the PC and retry the upgrade.

3.Reset the Windows Update download cache

ModerateChanges settings

A stale or damaged download cache can make Setup fail repeatedly.

Before you start: Deleting this folder clears update history details and cached downloads. Windows will download them again. Create a restore point first.

  1. Press WinR, type services.msc, and press Enter. Stop the Windows Update service.
  2. Delete the contents of C:\Windows\SoftwareDistribution. If files are locked, do this in Safe Mode.
  3. Restart the PC and retry. If it still fails, a clean boot or a full Windows Update component reset is also suggested in the Microsoft Q&A thread.

4.Try a different upgrade route

Moderate

A different method sometimes avoids the step that fails.

  1. Use the Windows 11 Installation Assistant from Microsoft, or mount an official Windows 11 ISO and run setup.exe from inside Windows to do an in-place repair upgrade.

5.Read the logs with SetupDiag

Advanced

SetupDiag parses the Windows Setup logs and tries to name the root cause, which is more useful than the generic code.

  1. After a failed upgrade, check whether Setup already ran SetupDiag for you. Open %WinDir%\Logs\SetupDiag\SetupDiagResults.xml in Notepad.
  2. Otherwise download the latest version from the SetupDiag page on Microsoft Learn. It needs .NET Framework 4.7.2 or newer and must run from an elevated command prompt.
  3. Open Command Prompt as administrator, go to the folder where you saved SetupDiag.exe, and run it. Open the resulting C:\SetupDiag\Results.log in Notepad.
    Command Promptrun as administrator
    SetupDiag.exe /Output:C:\SetupDiag\Results.log
  4. If several failures are listed, look at the last one: Microsoft says it is typically the fatal error, not the first.
  5. If SetupDiag reports an optional component failure with 0x8007001F, follow its advice: check that the Windows Modules Installer service (Trusted Installer) is started and set to automatic, optionally uninstall unneeded optional components in Windows Features, restart and retry.

6.Remove a duplicate user profile

AdvancedBack up first

Use this only if SetupDiag reports a duplicate user profile failure (rule DuplicateUserProfileFailure), or the extended code ends in 0D.

Before you start: Back up all files of the affected user account first. Do not delete the account you sign in with or any account you need.

  1. Note the SID and user name that SetupDiag reports as causing the failure.
  2. Check your own SID so you do not remove your own account.
    Command Prompt
    whoami /user
  3. Back up the files of the affected account, then delete that account in a supported way (through Windows account settings, not by editing the registry).
  4. Restart the PC and try the upgrade again.

7.Reset Windows or do a clean install

AdvancedBack up first

A last resort when every other route fails.

Before you start: Back up all your data first. A clean install erases the drive.

  1. Back up your files to external storage, then reset Windows or do a clean install of Windows 11.

Check that it worked

  • The upgrade or feature update completes without rolling back.
  • Settings > Windows Update shows no failed update with 0x8007001f.

If it still fails

  • Note the full code pair and use the phase and operation tables to see roughly where it fails.
  • Run SetupDiag and read its result for the specific failing step.
  • Ask on the Microsoft Q&A forum and include your SetupDiag output.

Sources

  1. SetupDiagOfficial · Microsoft Learn
  2. Windows update error 0x8007001f (Microsoft Q&A)Official · Microsoft
  3. Windows 10 upgrade error codesOfficial · Microsoft Learn
  4. Resolve Windows upgrade errorsOfficial · Microsoft Learn
  5. How to fix Windows 11 update/upgrade error 0x8007001F · Wintips.org