As a developer, anyone want at least to try two operating systems. I always love to work in Linux for any works except Microsoft .NET like systems. Not for me, but for my kids, I had to keep Windows as well. So for any reasons, developers want to have both Windows and Linux. In my case I have been using Ubuntu since 2008, most of the time dual boot, being Ubuntu secondary OS, that means I installed Windows first, then Ubuntu/Elementary OS.
Most of the time, to upgrade the Ubuntu version or to try different destro, I have to remove the installed one and re-install another. To do it, it is not one click task, so I have tried to list all the complete steps to be performed to remove Linux completely and keep Windows as it is. I had tried different pages to collect these steps.
Lets start, one by one:
- Delete partitions from computer management
- Click start button
- Hold down the shift key and click restart
- Then Click Troubleshoot
- Advanced Options
- Will restart the windows
- Press a key for boot options (it will be different in different vendors’ machine), for Dell normally it is F12
- Then select Windows from the boot options
- Then Windows will start with options, click Troubleshoot
- Choose the user and enter password
- In command prompt, enter the following commands
bootrec /fixmbr
bootrec /fixboot
If it says Access denied, enter the following command
bootsect/nt60 sys
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
exit
Now click Continue, it should start Windows normally. If it still shows GNU Grub screen with something like “Minimal bash line….” message, it might be because of your computer is with UEFI Windows-Linux dual boot.
So to completely uninstall the Linux, there is another way to do it as mentioned in this youtube video (https://www.youtube.com/watch?v=ZTMCKOx5Jz0).
You should always be safe to start Windows using boot options. So boot your PC with Windows OS from boot options.
Steps and commands mentioned in this video are as follows:
- Run command prompt as administrator. (Assumed you have already deleted the partitions as mentioned above)
- Type the command
diskpart
- Type
list disk
, it will show your connected partitions, in my case it was only one. (Disk 0 Online 966GB …..) - Type
select disk 0
, in my case it is 0, if there are multiple disks found, find EFI disk and enter the number. - Then type
list partition
, among different partitions, find partition with “System” type under “Type” and note the partition number. In my case, it was “Partition 1”. - Now select the partition, type
select partition 1
. - Then assign letter to the System partition. Type
assign letter=x
(or any letter you want)
Now open Windows Explorer or simply click This PC and you will see one more partition with the drive letter as X:
- Next exit from diskpart, type
exit
. - Type the letter that you assigned, in my case
x:
. - Type
dir
to see the folders. You should see a folder named “EFI”. - Change folder
cd EFI
- See the content of this folder
dir
. - Along with other directories, you should see a folder named with the Linux destro, in my case it was “ubuntu”.
- Now remove the folder, type
rd ubuntu /s
. Type “y” to confirm deletion. - Ensure the folder is deleted
dir
, now the folder MUST have gone.
Now you have successfully removed/uninstalled linux installed with Windows. You may now start the PC with Windows 10 OS without problems.