I reinstalled Windows 7 SP1 on an old laptop a week or 2 back. There were more than 200 updates available. Some of them failed and trashed the EDB. store so that Windows update just keeps going and getting nowhere. When you try to install an upgrade to Windows 10 on that Windows 7 system, the overactive Windows 7 update service (WUAUSERV) prevents the Windows 10 updates from getting through, and the upgrade tends to fail. Some folks have reported that stopping the WUAUSERV from the elevated command prompt (see below) a couple of times as required allows the upgrade to proceed - but it failed for me.
You can clean install as suggested above, or you can disconnect from the internet while doing the upgrade (without updates, updating the new installation later), or you can cancel the upgrade and stop WUAUSERV and delete the following files from an admin command prompt:
and let the updates to the Windows 7 system completely install themselves - it could be a whole night or day to complete on an older PC. The advantage is that if you find the upgrade rolling back to 7, you have a fully patched system ready to go.
Net stop wuauserv <enter>
del C:\Windows\SoftwareDistribution\DataStore\DataStore.edb <enter>
del C:\Windows\SoftwareDistribution\DataStore\logs\*.* <enter>
Net start wuauserv <enter>
If you decide to clean install, see here and get a "genuine ticket.xml" on your Windows 7 installation, before upgrading, and store it safely* in the event that activation does not take place, to use as a digital entitlement for your upgrade.
*USB storage, or zip it in an email attachment to yourself, so that you can obtain it easily from the new upgrade installation.