Teach you to completely uninstall Ubuntu dual system, decontamination without residue

Time:2022-4-27

We uninstall Ubuntu dual system for the following reasons:

1. Ubuntu system kernel is damaged and cannot be entered normally 
2. Ubuntu system allocation space is insufficient, and direct expansion is more complex
3. Don't use Ubuntu anymore. Clean up and make room

For whatever reason, we need to uninstall it. Here’s how to uninstall the Ubuntu system and let the computer disk return to the fresh state before installation.

My computer status
Lenovo Savior y7000 512g solid state drive ubuntu18 04 Win10

1. Set the startup item as the default Windows startup

After installing the dual system, we will generally display the startup item selection interface such as Ubuntu, Ubuntu advanced options and win10 after startup. If we don’t select it, we will enter Ubuntu by default. Now we want to move win10 to the top to realize the default startup.

When the icon appears after startup, immediately press F2 to enter the BIOS interface (different computers have different shortcut keys to enter BIOS, and you can search for details), and then enter the [boot] option. You can see that Ubuntu in EFI is in front of win10.

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
Select win10 and move it up to Ubuntu, as shown in the following figure:

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
Then, in [exit], select [exit saving changes] and press enter to save and exit.

Teach you to completely uninstall Ubuntu dual system, decontamination without residue

2. Delete Ubuntu system partition

Using disk management softwareDiskGeniusDelete several partitions of the Ubuntu system, including its EFI partition.Be careful not to delete the EFI partition of win10

1. When you open diskgenius, you can see your own disk partition. In the red box is my Ubuntu partition, because the partition size set by Ubuntu installation at that time is like this, so it’s quite certain.

Of course, it doesn’t matter if you forget which Ubuntu partitions you have.

(1) First of all, you know that your win10 EFI boot disk is usually 260m. Don’t move this!
(2) There is a small 16m MSR partition below. This is a reserved partition. Don’t touch it.
(3) Then there will be win10 disks such as C disk, D disk and e disk. You must know these and don’t need to move.
(4) Finally, there will be a 1000m partition, which is the recovery partition of the computer. Don’t touch it.

In addition to these, they are all the partitions of Ubuntu, and the exclusion method is used to solve the problem; Moreover, there are obvious mount point information under the Ubuntu disk, such as / home, /, swap and so on, which is easy to identify.
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
2. Once we know the Ubuntu partitions, we will delete them, right-click to select them, and then select Delete partition
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
3. After the deletion, we can see that diskgenius helped us merge these free partitions into one.
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
4. Then select disk – > Save partition table to make the partition effective.
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
5. Right click the free disk and select allocate free space to other disks.

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
6. Here, I will distribute the free disk to my e disk. After selecting it, a prompt box will pop up. Click Yes to help you merge the partitions.
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
7. The following is the merged computer disk information. We save the partition table again to make the partition effective, and then we can close diskgenius.

Teach you to completely uninstall Ubuntu dual system, decontamination without residue

3. Delete boot entry

After deleting all partitions of the Ubuntu system, there will still be the boot entry of the Ubuntu system in the EFI partition of windows. Our first step is to hide it so that the blue message of the detection disk will not pop up after restarting, but it has not been deleted,. If you don’t delete it, the Ubuntu system will still exist when you change the startup order.

1. Open the command line with Win + R and enter the following command

diskpart
list disk

Teach you to completely uninstall Ubuntu dual system, decontamination without residue

2. Select the installation disk of windows. The startup item is usually on disk 0, and then view the partition information of the disk

select disk 0
list partition

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
3. Determine the EFI partition of windows, which is generally more than 200 m. here is partition 1, and then assign a drive letter to it.

The drive letter cannot be repeated with the existing drive letter. For example, if your computer has a CDE disk, allocate the letters F, G, h, etc. after e in the 26 letters. It is best to separate a few letters to prevent you from inserting the U disk and drive.

select partition 1
assign letter=J

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
4. At this time, when win + e opens this computer, there will be the drive letter J just assigned
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
5. Due to insufficient permissions, the disk cannot be opened directly. It can be opened indirectly through Notepad. In windows accessories, run notepad with administrator privileges.
Teach you to completely uninstall Ubuntu dual system, decontamination without residue

6. Open the Notepad, click file – > open in the upper left corner, and select the newly added disk J. you will see an EFI folder inside

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
7. Enter EFI folder and delete Ubuntu folder
Teach you to completely uninstall Ubuntu dual system, decontamination without residue
8. Return to the command line and delete the drive letter just assigned. You can see the return to the original state

remove letter=J

Teach you to completely uninstall Ubuntu dual system, decontamination without residue
So far, Ubuntu uninstallation is completed, and you can start up and enjoy the happiness of windows!