How to Delete Ubuntu From Your Computer (Without Losing Everything Else)
Deleting Ubuntu isn't complicated, but it's one of those tasks where the right method depends entirely on how Ubuntu was installed in the first place. Get the approach wrong and you could wipe data you meant to keep, break a Windows bootloader, or end up with an unbootable system. Understanding the landscape first saves a lot of headaches.
Why the Removal Method Matters
Ubuntu can exist on your machine in several different configurations, and each one requires a different removal process:
- Sole OS on the drive — Ubuntu is the only operating system installed
- Dual-boot with Windows — Ubuntu and Windows share the same drive, each in separate partitions
- Dual-boot with macOS — Less common, typically using a third-party tool like rEFInd
- Installed inside Windows via WSL — Windows Subsystem for Linux, which runs Ubuntu as a Windows feature
- Installed via Wubi (legacy) — An older installer that treated Ubuntu like a Windows application
Each scenario has different risks and different steps. Treating them as the same process is where most users run into trouble.
Scenario 1: Removing Ubuntu From a Dual-Boot System (With Windows)
This is the most common situation, and also the most delicate. 🛠️
When Ubuntu is installed alongside Windows, your drive is divided into partitions — typically one or more for Ubuntu (including a swap partition) and a separate partition for Windows. Ubuntu also installs its own bootloader, GRUB, which controls what appears on your boot menu at startup.
The two-part problem: You need to both delete the Ubuntu partitions and restore the Windows bootloader. Skipping the second step leaves your computer trying to boot from GRUB, which will now point to partitions that no longer exist.
General process:
- Boot into Windows using installation media or a recovery drive if needed
- Open Disk Management (search for it in the Start menu) or use a tool like MiniTool Partition Wizard
- Identify and delete the Ubuntu partitions — these typically show as unformatted or formatted as ext4, which Windows labels as "unallocated" or unknown
- Extend your Windows partition into the freed space, or leave it as unallocated
- Repair the Windows bootloader using the Windows Recovery Environment — the command
bootrec /fixmbrandbootrec /fixbootare commonly used here for MBR-based systems; UEFI systems may needbcdeditadjustments or a repair install
The specific commands vary depending on whether your system uses MBR (older BIOS-based) or GPT/UEFI (most modern hardware since around 2012). Mixing up the repair process between these two is a common source of post-deletion boot issues.
Scenario 2: Ubuntu Is the Only OS
If Ubuntu is the only thing on the drive and you want to replace it with Windows, macOS, or another Linux distribution, the process is more straightforward. You don't need to preserve any existing boot configuration.
General process:
- Create a bootable USB drive for your new operating system using a tool like Rufus (for Windows) or balenaEtcher
- Boot from that USB drive
- During installation, format or delete the existing partitions as part of the setup process
- Let the new OS installer handle partitioning and bootloader setup
There's no need to manually touch GRUB or partition tools — the new installer overwrites everything. The main risk here is selecting the wrong drive if you have multiple storage devices connected.
Scenario 3: Removing Ubuntu From Windows Subsystem for Linux (WSL)
If you installed Ubuntu through WSL rather than as a traditional partition-based OS, removal is much simpler and carries no risk to your system's bootloader. 💻
In Windows 10/11:
- Open Settings → Apps → Installed Apps
- Search for "Ubuntu"
- Select it and click Uninstall
Alternatively, from PowerShell: wsl --unregister Ubuntu removes the Ubuntu distribution and all its data while leaving WSL itself intact.
This method only removes the Linux environment — Windows is completely unaffected.
Scenario 4: Ubuntu Installed via Wubi
Wubi was an unofficial installer that allowed Ubuntu to be installed from within Windows as if it were a regular application. It's no longer officially supported and hasn't been for several Ubuntu versions, but older machines may still have it.
If this applies to you, the removal process mirrors standard Windows application removal: Control Panel → Programs and Features → Uninstall Ubuntu. No partition editing required.
Key Variables That Change Your Approach
| Factor | Why It Matters |
|---|---|
| MBR vs. GPT partition table | Determines which bootloader repair commands apply |
| BIOS vs. UEFI firmware | Affects how boot entries are stored and managed |
| Number of drives in the system | Risk of formatting the wrong drive during reinstallation |
| Ubuntu version and install method | Older installs may use different partition layouts |
| Whether /home is on a separate partition | Affects whether personal files survive partition deletion |
One variable that catches people off guard: if your Ubuntu install has a separate /home partition, your personal files live there independently of the system partition. Deleting all Ubuntu partitions deletes those files too, unless you've backed them up elsewhere first.
Before You Delete Anything 🔒
Regardless of your setup, a few precautions apply universally:
- Back up any data stored on the Ubuntu partition you want to keep
- Know your partition layout before touching anything — Disk Management on Windows or
lsblkin a Ubuntu terminal both give you a clear picture - Have Windows installation media ready if you're removing Ubuntu from a dual-boot — you'll likely need it to repair the bootloader even if you don't do a full reinstall
The method that's right for your situation depends on how Ubuntu was originally installed, what hardware generation you're on, and what you plan to replace it with. Each of those factors points toward meaningfully different steps — and different risks if the wrong path is chosen.