How To safely uninstall Ubuntu and restore Windows 8?
Simply use this tool from a live disc: OS-Uninstaller
I recommend the following:
- Boot from an emergency system (Ubuntu in "live CD" mode, PartedMagic, System Rescue CD, or whatever).
- Mount your EFI System Partition (ESP). This is often (but not always)
/dev/sda1
. It's always a FAT32 partition that has its "boot flag" set (inparted
terminology) or a partition type code of EF00 (ingdisk
terminology). - Launch a shell and change to the ESP.
- Type
sudo rm -rf EFI/ubuntu
. (You can omitsudo
on some systems.) - If you ever used Boot Repair on the disk, undo its damage:
- Change to
EFI/Microsoft/Boot
on the ESP. - Move
bootmgfw.efi.bkp
tobootmgfw.efi
, overwriting the existing file. - Change to
EFI/BOOT
on the ESP. - Move
bootx64.efi.bkp
tobootx64.efi
, overwriting the existing file.
- Change to
- Launch GParted,
parted
,gdisk
, orcgdisk
on the disk. - Delete the Linux partition(s).
- Optional: Resize the Windows partition(s) to fill the disk. It's probably best to skip this if you intend to do a fresh re-install of Ubuntu, since you'll just undo this change shortly.
- Reboot into Windows to test that it still works. This will probably also clear out the EFI's NVRAM entries for Ubuntu.