How to Uninstall Windows or Linux After a Dual Boot

Get rid of one and keep the other

Delete an Operating System From Your PC

Image Source/Getty Images

Dual boot configurations allow you to switch between operating systems as the need arises, but they also require a reboot to do so, as well as additional disk space. If you find you're not using one of your operating systems often, you may want to transfer it to a virtual machine, or get rid of it entirely. Here's how to pare your machine down to one OS and remove Windows or Linux after a dual boot.

Knowing the Current State of Your Drive

With two operating systems installed, your drive will be split up into multiple disk partitions. You should get acquainted with the layout of the disk by using a partition management tool, and it should be the one in the operating system you're going to keep, since that's what you'll be using to get rid of the other OS.

On Windows

If you're planning to keep Windows, you can view the disk layout as follows:

  1. Make sure you're logged into Windows as an Administrator.

    Disk Management Utility in Windows
  2. Launch the disk management tool by going to Start > Control Panel > Administrative Tools > Manage Disks and Partitions.

    Read How to Delete a Windows Recovery Partition to learn more more about the disk management tool.

  3. The tool will display the disk containing the C: drive by default. You can view the drive's partitions, and should be able to pick out your other OS by the size of the drive. It will also likely show as a "Healthy" partition, but it won't have a drive letter assigned.

On Linux

If you're using Linux, you can use one of the descendants of the parted. It will be either gParted, if you're using Ubuntu and the GNOME desktop, or the KDE Partition Manager if you're using a KDE-based OS. The layout is quite similar, however, with the disk represented as a horizontal bar, and the partitions blocks within it.

KDE Partition Manager in Linux

Start by identifying the partition containing the OS you want to remove. You can do this using one of three things:

  • Label: The label may clue you in, if the partition is indeed labeled and accurate, but this may not always be the case.
  • Size: The size is also a good indicator. You'll likely know what size the "main drive" for each operating system is, and the partition manager will tell you that. Bear in mind you may be seeing slightly different numbers based on the way the partition manager accounts for size.
  • File System type: The file system type is an easy way to tell OS partitions apart. Windows partitions will display as NTFS and have a drive letter; Linux, you can still see the NTFS file system, as well as common Linux ones such as ext4, xfs, jfs, and btrfs.

Once you have the unwanted OS partition in your sights, you can get ready to uninstall it.

Preparing for the Uninstall Process

If you have the means, take a mirror image backup of the entire drive, as there's always a chance something could go awry and leave you with an unbootable system. In addition, move any personal files inside the unwanted OS somewhere else, like a thumb drive or cloud service. This way, if the operation goes to plan, you'll have all your files handy.

While we're effectively uninstalling the OS, we won't be running an uninstaller as you would with a Windows application. Instead, we're deleting the partition where the other operating system resides. This will destroy everything on that partition, including your personal files as well as the OS itself.

How to Remove Windows or Linux and Reclaim Unused Disk Space

Start by booting into the OS you'll be keeping, then start the partition manager again.

To reiterate, at this point you'll be removing the disk partition and everything it contains, including all traces of the old OS but one. If you're unsure about your backups, now is the time to go back and take them.

How to Remove a Partition in Windows

  1. Open the Manage Disks and Partitions tool, then right-click the partition to remove.

    Deleting the OS Partition in Windows Disk Management
  2. Select Delete Volume.

  3. Accept the resulting dialog, which re-affirms everything in the partition will be lost.

  4. The space where the prior partition resided should now show as Unallocated space. To get it back, you'll Extend the Windows partition to take it over. Right-click on the Windows partition (i.e. the C: drive).

  5. Select Extend Volume.

    Extending a Partition in Windows Disk Management
  6. You'll launch into the Extend Volume Wizard. Select Next to start.

    Windows' Extend Volume Wizard
  7. The dialog should already have all of the empty space selected. If you'd like to further sub-divide this, you can reduce the space, then add additional disks, but just select Next to join it all to your C: drive.

  8. Select Finish to complete the extension.

How to Remove a Partition in Linux

  1. In Linux, start up KDE Partition Manager or gParted.

  2. Find and right-click the unwanted partition. It can't be mounted when you delete it, so select Unmount.

    Unmounting a Partition in KDE Partition Manager
  3. Right-click the partition again and select Delete. If you're very security conscious, you can also select Shred. This will overwrite that portion of the disk with some data to make sure there's no trace of the old files left.

  4. Select Apply for the changes to actually be written to the hard disk.

  5. Select the remaining partition and select Resize in KDE Partition Manager or gParted.

    Resizing a Partition in KDE Partition Manager
  6. A dialog will appear with some options, but by default it should already filled in with the values that will absorb the empty space. You'll know you're on the right track if the Free Space After field shows zero, meaning the partition will be expanded to take advantage of that big blank spot in your drive.

  7. Select Apply to commit the changes to your drive.

How to Fix the Boot Manager After Removing OS Partition

As previously stated, deleting the partition would leave one last piece of the OS behind, specifically its entry in your machine's boot manager. Each OS has its own boot manager, and the configuration of these will depend a bit on how you set things up in the first place.

Windows

You may be using the Windows Boot Manager if you had Linux installed first, as Windows would want to make sure it's own tool is in place. The Windows System Configuration tool will allow you to remove the Linux entry in point-and-click fashion.

  1. Open the Start Menu, then enter "System Configuration" into the search bar and select System Configuration.

    Launch the System Configuration Tool From the Start Menu
  2. Select the Boot tab.

    System Configuration's Boot Settings
  3. Select the entry corresponding to the OS you deleted, then select Delete.

  4. Select either OK or Apply to commit your changes and close the window.

Linux

If you're sticking with Linux, you'll probably have the the grub2 boot manager installed. In this case, you have two choices, assuming you don't want to mess around with the text configuration file:

  • Run the os-prober command: This will search your hard drive for operating systems and add them to grub's config file. However, this is highly automated, and may have some unexpected consequences.
  • Grub Customizer: A more hands-on method, Grub Customizer is a utility that gives you control over a wide range of grub options, including its boot entries, theme, and options.

To use Grub Customizer to remove the entry for your former operating system:

  1. Install Grub Customizer by running the following terminal commands:

    $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    $ sudo apt update
    $ sudo apt install grub-customizer
  2. Launch the tool from the app menu, or run grub-customizer from a terminal or command runner.

    Customizing the Boot Menu with Linux's Grub Customizer
  3. The app should launch on the List configuration tab. This lists all the entries in grub's boot menu.

  4. To remove an entry, simply select it, then select Remove.

  5. Finally, select Save to commit the changes.