Back up all important files from both operating systems
Boot into Windows
Open Disk Management
Identify the Ubuntu partitions
Delete the Ubuntu partitions
Extend the Windows partition if needed
Open Command Prompt as administrator
Run `diskpart`
Run `list disk`
Run `select disk X`
Run `list partition`
Run `select partition Y`
Run `delete partition override`
Exit `diskpart`
Restore the Windows bootloader
Open Command Prompt as administrator
Run `bootrec /fixmbr`
Run `bootrec /fixboot`
Run `bootrec /rebuildbcd`
If needed, run `bcdboot C:Windows`
Restart the computer
Enter BIOS or UEFI settings
Change the default boot order to Windows Boot Manager
Remove the Ubuntu boot entry if it still appears
Save changes and reboot
Verify Windows starts normally
Reclaim any unallocated space for Windows if desired
