How to delete Ubuntu: A few weeks ago, you decided to approach the Linux world and install Ubuntu on your PC, but the results have not been exciting. You keep getting better with Windows and, for this reason, you would now like to remove the open source operating system from your computer to free up some space on the hard disk. I guessed it and would you like to know if I can help you achieve your goal? But of course yes, don’t worry.
Given that my invitation would be to give Linux a second chance, perhaps by trying another distro able to better adapt to your needs, if you want, now I’ll explain how to delete Ubuntu both in case you have installed the distro in dual boot with Windows and as a single operating system of the PC.
For completeness, then, I will deal with explaining how to proceed in case you have chosen to take advantage of the Bash shell of Linux on Windows 10 and want to disable it. In short, at the end of the reading you should have a rather clear picture of the situation. Now, however, just chat and we finally enter the heart of the matter. I wish you, as usual, happy reading, and I will give you a huge good luck for everything!
Before explaining what are the steps that must be taken to succeed in delete Ubuntu from the computer, there are some preliminary operations that you need to do, to make sure that everything goes the right way.
First, since with the removal of Ubuntu, the data will also be deleted from the partition of the hard disk on which the operating system is installed (unless you have created a specific partition just for their storage), I suggest you to perform quite a lot backup.
To do this, just connect a external hard disk to your computer and transfer your personal files to it, using the file manager Ubuntu, accessible by clicking on the File (the one with the drawer) that you find on Dock bar.
Alternatively, you can take advantage of the tool included in Ubuntu and used specifically for making backups, which you can access by clicking on the icon with the gear wheel located in the upper right part of the screen, selecting the item System settings from the menu that opens and, finally, selecting the item Backup in the window you see appear on the desktop.
Another thing that I advise you to do is to get the Windows installation support, which you can use to restore the boot loader (if you installed Ubuntu in dual boot) or for install again the Microsoft home operating system (if you installed Ubuntu as the only operating system on your PC).
If you do not have Windows installation support, you can get the ISO image of the operating system using the official instruments made available by Microsoft for Windows 10, Windows 8.1 is Windows 7 and following my directions on how to create a bootable USB stick or how to burn ISO files to CD / DVD.
How to delete Ubuntu from dual boot
Without the above clarifications, let’s get down to it and let’s find out how to delete Ubuntu from the PC, when the distro is present in dual boot with Windows.
How to wipe Ubuntu from the Windows EFI partition
If the PC you are using is recently produced and installed on it Windows 8 or a later version of the operating system, you find yourself dealing almost certainly based on UEFI, the latest generation BIOS with graphic interface and mouse support (as well as advanced security measures). In this case, to cancel Ubuntu, you have to go to act on Windows EFI partition, which is the one in which the data relating to the operating system boot procedure are kept: let’s see immediately how.
To begin with, start the utility Disk managementby clicking on the Start button (the one with the Windows flag) located in the bottom left part of the taskbar, typing the term “Partitions” in the search field displayed and selecting the result Create and format hard disk partitions.
In the window that opens, right-click on the panel relating to the partition on which Ubuntu is installed and click on the item first Delete volume, in the menu that appears, and then on the button Yup, in order to proceed with the deletion of the Ubuntu partition.
Now, repeat the same operation for the Ubuntu SWAP partition (which should be much smaller than that of the operating system): you will get a green box with free space equivalent to the space of the two deleted partitions. Then right-click on the latter and select the item Delete partition from the menu that opens, so as to permanently delete the Ubuntu partitions and get unallocated space.
We are almost there! Now you have empty space that you can re-join to the main partition of your PC, the one on which the Microsoft home operating system is installed. So, right click on Windows partition pane (Eg. C:) and select the item Extend volume from the menu that is shown to you. In the window that opens, first click on the button Forward twice in a row and then on that end, to complete the operation. That’s it: you’ve just uninstalled Ubuntu permanently.
Once you do that, you need to take action through the Command prompt, with administrative privileges. So, click again on Start button, type “Prompt” in the search field, right click on the link relative to the Command Prompt, select the item Run as administrator from the menu that appears and, in the window that opens, click on the button Yup.
In the Command Prompt screen you see, type the command diskpart and press the button Submit on the keyboard, in order to access the Windows disk management tool. Next, issue the command list disk, to find out the list of hard drives on the computer, and locate the main PC disk (e.g. Disc 0). Now, select the latter, using the command select disk X (instead of the X you have to type the number corresponding to the disk) and give the command list part, to view the list of partitions available on the unit.
Now you need to locate the EFI partition: to find it, call the tool again Disk management and check which one of the partitions indicated in the boxes below is described as EFI system partition. Keep in mind that it is usually the smaller one (500 MB or less).
After finding the right partition, issue the command select part X (instead of the X you have to type the EFI partition number) in the Command Prompt window, assign a letter to the partition using the command assign letter = x (instead of the x you can choose any drive letter, except for those already in use on your computer) and exit diskpart by typing the command exit.
Well: in doing so, you managed to mount the EFI partition in Windows but, to modify its content, you have to intervene from File Explorer, by logging in as an administrator. To do this, open and close the Windows file manager always using the Command Prompt, typing the commands taskkill / im explorer.exe / f (to close the File Explorer) and explorer.exe (to restart it).
Then, open the file explorer by clicking on the icon yellow folder present on taskbar, select the item Computer you find on the left, go to the EFI partition and go to the folder EFI present in it. Then delete the named folder Ubuntu, moving it to the Trash can.
Then proceed to unmount the partition from Windows by issuing the following strings in the Command Prompt: select disk x (instead of the x you have to type the disk number where the EFI partition is located); select part x (instead of the x you have to type the EFI partition number); remove letter = x (instead of the x you have to type the letter of the EFI partition).
Finally, you have to worry about removing the reference to Ubuntu in the UEFI menu: to do this, you need to start a live version of Ubuntu (from USB stick or DVD), as I indicated in my guide dedicated to how to install Ubuntu, and install the utility efibootmgr from Terminal, giving commands sudo apt-get install efibootmgr is sudo modprobe efivars, followed by pressing the button Submit on the PC keyboard.
At this point, call up the display of all the items attached to the UEFI boot menu, giving the command sudo efibootmgr, and locate the one referring to Ubuntu (e.g. Boot0005 ubuntu, which in this case would be item number 5). Finally, give the command sudo efibootmgr -b 5 -B (instead of 5 you have to type the number corresponding to the boot entry to be deleted).
If proceeding in the way I just indicated to you, you have problems starting Windows, you can try the restore boot files from the OS recovery menu. If you are using Windows 10, you can access it by calling the Start menuby clicking on the icon Settings (the shaped one gear wheel), by selecting the items Update and security is Restoration in the window that appears and clicking on the button Restart now, located near the wording Advanced startup.
If, on the other hand, you are using Windows 8 / 8.x, log in to Start Screen, type “pc settings” in the search field and select the link relevant among those displayed. In the next screen, click on the items Update and restore is Restoration and on the button Restart now.
Afterwards, regardless of the version of Windows used, select the items Troubleshooting, Advanced options is Startup reset and wait for the whole procedure to be completed.
How to wipe Ubuntu partition from PCs with BIOS
If your PC is based on the classic BIOS, so this is an old-fashioned computer sold with Windows 7 or an earlier version of the OS, the first step you need to take is to remove the partition dedicated to Ubuntu.
To do this, click on the Start button (the one with the Windows flag) that you find in the bottom left part of the taskbar, type the term “Partitions” in the search field attached to the menu that opened and select the result Create and format hard disk partitions among those available. Through the window that you see appear, proceed with theUbuntu elimination, as I indicated to you in previous chapter.
If after performing the second Ubuntu uninstall procedure, when you start your PC, you get a error message relating to GRUB or MBR, you need to restore the Windows boot loader. How? I’ll explain it right away.
If you use Windows 7 or Vista, to do this, get the installation support of the operating system, as I indicated in the chapter at the beginning of the article, connect it to the PC and start from the latter, pressing a key when the writing appears press any key to boot from CD-ROM or DVD-ROM. If the writing does not appear and / or Windows starts again, change the order of boot devices in the BIOS, by setting the recorder or the USB port first, as I explained in my guide on how to set up the BIOS.
In the screen that you later see on the screen, click on the button Forward, then on those Reset the computer, Forward is Command prompt. In the command line window, then issue the commands Bootrec.exe / fixboot is Bootrec.exe / fixmbr, both followed by pressing the button Submit on the keyboard. Finally, restart your PC.
How to delete Ubuntu and install Windows
If what you care to understand is how to delete Ubuntu by going to install windows in its place, because you installed the distro as the only operating system of the computer, the steps you need to take are quite simple: you find them illustrated below.
The first move you need to make is to get yourself the Windows installation support, as I indicated to you in chapter at the beginning of the tutorial, connect it to the computer on which Ubuntu is currently installed and turn on or restart it.
Then when, when the PC starts, you will see the message appear press any key to boot from CD-ROM or DVD-ROM, press a key as desired on the computer keyboard, to boot from Windows media. If the writing does not appear and / or Ubuntu starts again, change the order of the devices for the bootBy setting the recorder or the USB port first, as I indicated in my tutorial on how to set up the BIOS.
Once this is done, the wizard for installing Windows will start and you will have to worry about setting the tongue of the operating system, the format and the currency and the keyboard layoutby clicking on the buttons Forward is Install.
Then enter the product key of your copy of the operating system (if required) or choose to provide it once the installation procedure is completed, put the check mark on the box to accept the conditions of the license agreement and click once more on the button Forward.
Then select the option custom, click on Ubuntu partition (which is the one marked with the wording System in the column Guy), press on the item Unit options (advanced) located at the bottom right and click on the link first Delete and then on the button OK, to confirm the execution of the operation.
Finally, check that the partition you just formatted is the selected one, click on the button Forward and wait for the Windows installation to complete and for the configuration of the devices to be performed.
Then, follow the initial procedure to set up the Microsoft home operating system, after which you can finally start using the OS. If you need further details, check out my specific guides on how to install windows 10, how to install windows 8 is how to install windows 7.
How to delete Ubuntu from Windows 10
If you are using a PC with Windows 10 and if you had enabled the use of Linux Bash shell, which allows you to run native software for Ubuntu without installing the entire operating system, you can disable it in a very simple way.
First start the Command prompt with administrative privileges, by clicking the Start button (the one with the Windows flag) located in the far left part of the taskbar, typing “Cmd” in the search field displayed by right-clicking on the link relevant, by selecting the item Run as administrator from the menu that appears and clicking on the button Yup.
In the window that opens, if you want to delete the Ubuntu Bash keeping home and root folder, type the command lxrun / uninstall and press the button Submit on the keyboard. Then confirm the execution of the operation by pressing the button Y.
If, on the other hand, you prefer to remove the Ubuntu Bash deleting all the files and folders, issue the command lxrun / uninstall / full, always followed by pressing the button Submit on the computer keyboard, then press the button Y to confirm everything.
If you want, you can also remove completely the Linux Bash from the PC. In this case, however, you have to act on the Windows settings. So, click on Start button, type “control panel” in the search field and select the link corrected from the displayed list.
In the window of the Control panel, then select the item Programs and / or Programs and features (depending on the type of display set), click on the link Enable or disable Windows features that you find on the left side of the screen, remove the check from the option Windows subsystem for Linux you find in the additional window that appears and click on the button OK, to complete the procedure.