How To safely uninstall Ubuntu and restore Windows 8?

Simply use this tool from a live disc: OS-Uninstaller

enter image description here


I recommend the following:

  1. Boot from an emergency system (Ubuntu in "live CD" mode, PartedMagic, System Rescue CD, or whatever).
  2. 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 (in parted terminology) or a partition type code of EF00 (in gdisk terminology).
  3. Launch a shell and change to the ESP.
  4. Type sudo rm -rf EFI/ubuntu. (You can omit sudo on some systems.)
  5. If you ever used Boot Repair on the disk, undo its damage:
    1. Change to EFI/Microsoft/Boot on the ESP.
    2. Move bootmgfw.efi.bkp to bootmgfw.efi, overwriting the existing file.
    3. Change to EFI/BOOT on the ESP.
    4. Move bootx64.efi.bkp to bootx64.efi, overwriting the existing file.
  6. Launch GParted, parted, gdisk, or cgdisk on the disk.
  7. Delete the Linux partition(s).
  8. 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.
  9. Reboot into Windows to test that it still works. This will probably also clear out the EFI's NVRAM entries for Ubuntu.