Dual-booting is the second best way to try a new operating system, besides a virtual machine. What happens, though, if we like the new OS better? In this guide, we will see how to delete Windows from a Linux Mint or Ubuntu dual-boot installation.
We can use this guide to delete Windows XP, Windows Vista, Windows 7, or Windows 8.
We can even delete Windows 98 because it seems that some people are still using it.
We used Linux Mint 17.2 for the guide, but it should work the same with any other distribution, Debian/Ubuntu based or not.
Table of Contents
Backup our personal files from Windows and Linux
To delete Windows, we must delete the OS's partitions. It is a safe procedure, but any major partitioning operation runs a small risk that something could go wrong.
So it's best if we backup all our personal files, not just from Windows, but from Linux too.
This way, in case of trouble, we can always do a clean Linux installation.
Using GParted to delete Windows
GParted, or the "Gnome Partition Editor" is the best known GUI partitioning tool for Linux. It comes pre-installed with Linux Mint, Ubuntu, and most other distributions' live environments.
We can download the GParted ISO, a special distribution just for running GParted. But chances are we already have a boot DVD/USB of our original distribution lying around.
On this guide, we will be using the Linux Mint Live DVD/USB.
After booting up, we launch GParted from the Administration section.
This is the partition layout of a typical Windows-Linux dual-boot installation.
In the example, /dev/sda1 and /dev/sda2 are the NTFS Windows partitions. If we had a D: partition, it would have been /dev/sda3.
Linux partitions /dev/sda5 and /dev/sda6 are within the extended /dev/sda3 partition.
The first order of the day is to right-click and delete each NTFS partition.
Then, we right-click the linux-swap partition and choose "swapoff".
With the swap turned off, we right-click on the extended partition and select "Resize/Move".
On the window that comes up, we drag the extended partition's left side all the way to the left. Once it occupies all the free space, we click Resize/Move.
If the 1 MiB at "Free space following" messes with our need for neatness, there is nothing we can do. There needs to be and empty Megabyte on the beginning or the end of the partition.
The final step is to move and resize the Linux partition.
If we want to give some more space to the swap partition, for some reason, we should leave enough "free space following".
The same goes if we have a separate /home partition, which makes sense for it to be large for our personal files.
Else, we drag the main Linux partition until it takes up all the free space.
This "Resize/Move" will give us a warning, that our system might not boot afterward. Don't worry, we have a plan for such an occurrence.
If we changed our minds and decided not to delete Windows anymore, we needn't worry.
Until we click on the "Apply All Operations" button, nothing will change on the disk and the partitions. We can close GParted, reboot, and Windows will be still there.
Once we are 100% positive that we want to delete Windows, we click on the "Apply All Operations" button.
How long this process will take depends on how much data we had on the Linux partition, and how fast is our hard disk drive.
For a large Linux installation on a slow HDD drive, it could take hours. For a small installation on an SSD, it will take minutes.
During the operations, we mustn't shut down the system for any reason. Doing so will destroy the Linux installation.
When all operations complete, we can reboot the system.
How to delete Windows from GRUB
On next boot, GRUB will still be showing the Windows entry, like a phantom limb.
It's easy to get rid of it, though. We just need to open a terminal with ctrl+alt+T within our distribution and type:
This will scan the disk for any and all operating systems, and create the proper GRUB entries.
On next reboot, Windows is gone, like it was never there.
If your distribution has a bootloader other than GRUB, you need to consult its man-page on how to update the OS entries.
What if Linux doesn't boot anymore
In the rare case we can't boot into our distribution, we load up the live environment again.
We make sure have an Internet connection, open a terminal (ctrl+alt+T) and type:
sudo add-apt-repository ppa:yannubuntu/boot-repair -y
sudo apt-get update
Don't worry if you get a "failed to fetch cdrom" error message when using a Linux Mint live DVD/USB. It's normal.
Finally, we type:
sudo apt-get install boot-repair -y
When the installation concludes, we start the Boot Repair with the command
Clicking on the "Recommended repair" button should fix all our boot problems.
We click "No" at the prompt to install the [pastebinit] packages.
After one or two minutes, we 're ready.
We can now enjoy our Windows-free system.
What was your reason to delete Windows?
There are many reasons to delete Windows and stay with a Linux distribution. Linux is free, open source, safe from Windows malware, and it works fast on old hardware.
So, what was your reason to delete Windows? Leave us a comment.
- Gparted: The Best GUI Linux Partition Manager
- How To Change GRUB boot order in Linux Mint / Ubuntu
- Kernel Upgrade 4.11.5 in Linux Mint / Ubuntu
- Linux Virus Scan With the Free Bitdefender for Unices
- How To Create a Software RAID 5 in Linux Mint / Ubuntu
Do you want to support PCsteps, so we can post high quality articles throughout the week?
If you prefer your purchases from China, we are affiliated with the largest international e-shops: