What happens when you wipe Linux

Wiping Linux from your PC means removing the operating system entirely so you can install Windows, macOS, or another system in its place. The process involves deleting the Linux partitions on your hard drive and reclaiming that space. This is permanent — once you wipe Linux, the files and system are gone unless you have a backup elsewhere.

The exact steps depend on how Linux was installed. If Linux is the only system on your computer, you'll wipe the entire drive. If Windows and Linux share the drive, you'll remove only the Linux partitions. Either way, you need to boot from an external drive (a USB stick or DVD) to do the work, because you can't delete an operating system while it's running.

Before you start, back up any files you want to keep. Even if they're on the Linux side, copy them to an external hard drive or cloud storage first. Once you begin the wipe process, recovery becomes difficult and expensive.

Key Takeaways

  • You must boot from an external drive (USB or DVD) to wipe Linux, because you cannot delete an operating system while it is running.
  • If Windows and Linux share your drive, use a tool like GParted to delete only the Linux partitions and leave Windows untouched.
  • If Linux is your only system, you can wipe the entire drive during a fresh Windows or macOS installation.
  • Back up any files you want to keep before you start, because the wipe process is permanent.
  • After wiping Linux, you may need to fix your boot settings in BIOS or UEFI so your computer starts correctly.

Check what's on your drive right now

Before you delete anything, you need to know whether Linux is alone on your drive or sharing space with Windows or another system. Boot into Linux one last time and open a terminal. Type lsblk and press Enter. You'll see a list of all your drives and partitions — look for names like sda, sdb, nvme0n1 (these are the drives themselves) and sda1, sda2 (these are the partitions on those drives).

Look for partitions labeled as Windows (often marked as NTFS or FAT32) or other systems. If you see only Linux partitions (marked as ext4, btrfs, or similar), Linux is your only system. If you see Windows partitions and Linux partitions on the same drive, they're sharing space and you need to be careful to delete only the Linux side.

Write down the drive name and partition names on a piece of paper. You'll need this information in the next steps.

Create a bootable USB drive with a wipe tool

You need to boot your computer from an external drive so you can delete Linux while it's not running. The easiest tool for this is GParted Live, a small operating system that runs from a USB stick and lets you manage partitions. Download GParted Live from gparted.sourceforge.io — look for the ISO file (usually about 300 MB).

On another computer (or on Windows if you still have it), download a tool like Etcher (balena.io/etcher) or Rufus (rufus.ie). Plug in a USB stick with at least 1 GB of space. Open Etcher or Rufus, select the GParted ISO file you downloaded, select your USB stick, and click the button to write the image. This takes a few minutes. When it's done, eject the USB stick safely.

If you're wiping Linux to install Windows fresh, you can also use the Windows installation media instead. Download the Windows ISO from microsoft.com, write it to a USB stick the same way, and you can wipe and install in one process.

Boot from the USB stick and access the partition tool

Shut down your computer completely. Plug in the USB stick with GParted Live. Turn the computer back on and immediately start pressing the boot menu key — this is usually F12, F2, Esc, or Del, depending on your computer brand. You should see a menu listing your drives. Select the USB stick (it may be labeled as a removable drive or show the USB brand name).

GParted Live will boot and show you a desktop. Click on the GParted icon or open it from the menu. You'll see a window showing all your drives and partitions — this is the same information you saw in the terminal earlier, but now you can see it visually and make changes.

At the top right of the GParted window, there's a dropdown menu showing your drive (like /dev/sda). Make sure you're looking at the correct drive before you delete anything. If you have multiple drives, selecting the wrong one will wipe the wrong system.

Delete the Linux partitions

In GParted, you'll see colored blocks representing each partition. Linux partitions are usually labeled ext4, btrfs, or similar. Right-click on each Linux partition one at a time and select Delete. The partition will turn gray, showing it's marked for deletion but not yet removed.

If Windows or another system is on the same drive, do not delete those partitions. Only delete the ones labeled as Linux. If you're unsure which partitions belong to Linux, look at the size and label — Linux systems typically have a root partition (/) and sometimes a separate home partition (/home) or boot partition (/boot).

Once you've marked all the Linux partitions for deletion, click the green checkmark button at the top of the window labeled Apply. GParted will ask you to confirm. Click Apply again. The deletion process takes a few minutes depending on how large the partitions are. When it's done, the space will show as unallocated (usually gray or black).

Fix your boot settings after wiping

Shut down the computer and remove the USB stick. Turn the computer back on. If you had Windows on the same drive, it should boot normally. If Linux was your only system, your computer may not boot at all — it will show an error or a blank screen.

If the computer won't boot, restart it and enter the BIOS or UEFI settings. The key to press is usually F2, F10, Del, or Esc during startup — watch the screen for a message like "Press F2 to enter Setup". Once inside, look for a section called Boot or Boot Order. You may see entries for Linux bootloaders (often labeled GRUB or showing a Linux name). Delete or disable these entries. Save and exit. The computer should now attempt to boot from your hard drive's Windows installation or show a message that no operating system is found.

If you're installing a fresh operating system, insert the Windows or macOS installation media and boot from it. The installer will guide you through wiping the remaining space and setting up the new system.

Install a new operating system (optional)

If you want to put Windows or another system on the space where Linux was, insert the installation media and boot from it. During the installation process, you'll see your drives and partitions. Select the unallocated space (the area you just freed up by deleting Linux) and the installer will format it and install the new system.

If you're installing Windows, the installer will handle the boot settings automatically. If you're installing macOS, you'll need a Mac computer to create the installation media first. For other Linux distributions, the same process applies — boot from the installation media and select the unallocated space.

After installation completes, your computer will restart and boot into the new operating system. You can now use the freed space as part of your new system.

Frequently Asked Questions

What if I accidentally delete the wrong partition?

If you mark a partition for deletion but haven't clicked Apply yet, you can right-click it again and select Undo. Once you click Apply, the deletion is permanent. This is why writing down your partition information beforehand is important — it helps you identify which ones are Linux.

Can I recover files after wiping Linux?

Recovery is possible but difficult and expensive. Immediately stop using the computer after wiping and contact a data recovery service. The longer you use the drive, the more the deleted data gets overwritten. Recovery costs typically range from several hundred to over a thousand dollars.

Do I need to wipe the entire drive or just the Linux partitions?

If Windows is on the same drive, wipe only the Linux partitions. If Linux is your only system, you can wipe the entire drive during a fresh Windows or macOS installation — the installer will format everything and set it up for you.

My computer won't boot after I wiped Linux. What do I do?

This is normal if Linux was your only system. Restart the computer, enter BIOS or UEFI settings (usually by pressing F2 or Del during startup), and remove any Linux bootloader entries from the boot order. Save and exit. If you want an operating system on the computer, insert Windows or macOS installation media and boot from it.

Can I undo a wipe after I've clicked Apply?

No. Once you click Apply in GParted, the deletion is permanent and cannot be undone from within the tool. This is why backing up your files first is essential.