Skip to main content

Command Palette

Search for a command to run...

How to delete any dual boot OS from your PC and delete the grub boot loader?

Published
2 min read
A
A developer who loves to code in Python on Linux, always curious about learning something new.

If you want to remove any Linux or Android x86 OS from your PC, but don’t know how?

You ever deleted any Linux OS and encountered a grub rescue problem?

After deleting Linux OS, grub bootloader is still present?

Don’t worry, Just follow these simple steps to solve those problems.

Deleting Linux OS

To delete Linux OS, forget the complex steps.

Just go to the Disk Management and delete the Partition in which that OS is installed.

After deleting that Partition, you won’t be able to boot into that OS, but the Grub bootloader is still there, and you may encounter grub rescue problem.

Removing Grub Rescue

If you encounter grub rescue problem, it means that the default bootloader is still set to grub.

To change this, follow these steps :

These steps are for an UEFI system. In legacy, it may differ.

Step 1 : go to the BIOS settings.

step 2 : Under the System Configuration, go to the Boot options as shown below :

image.png

Please note that the BIOS setup will vary according to the manufacturers.

step 3 : move the Windows to the top

step 4 : save the settings and restart the PC.

Now, you will be able to boot into Windows.

Deleting the grub using CMD :

After booting into windows, follow these steps :

Step 1 : open CMD.

Step 2 : enter the following commands one by one :

diskpart
list disk
sel disk 0
list vol

Now, all the Partitions will be listed including System partitions.

image.png

If the System partition is in volume 5 (In my case) (It’s approximate size is 100 MB and is of FAT32 file system), enter the following command :

sel vol 5
assign letter = x
exit

image.png

After Exit, again open CMD in an administrator mode.

Enter the commands one by one :

X:
dir
cd EFI
dir

image.png

Now, you will find all the bootloaders including Windows, Linux or any other, that are present in your PC.

You can see in the above screenshot that there are several bootloaders are present, including Microsoft Windows, boss Linux, Parrot OS and refind.

I am going to delete boss Linux’s bootloader. You can change your command according to your desired OS.

Just enter the following command to delete the grub bootloader.

rmdir /s boss

image.png

You can see that, boss is gone from the list.

This method can also be used for removing Ubuntu, Mint or any other Linux bootloader or even for Android x86 OSs.