To erase Ubuntu completely, boot a live USB session, delete the Ubuntu partitions using a partition manager or the OS-Uninstaller tool, then repair your bootloader if the system is dual-boot.
Whether you want to reclaim disk space, switch to a different Linux distribution, or remove Ubuntu from a dual-boot Windows machine, the process involves three basic steps: safely deleting Ubuntu’s partitions, handling the bootloader, and—on dual-boot systems—restoring the Windows boot entry. Each method below uses tools included or officially recommended by Ubuntu, so you can pick the one that matches your comfort level.
Before you start, back up any important files on the Ubuntu partition. Partition deletion is irreversible, and a mistake can wipe data you need. You will also need a USB flash drive with a live Ubuntu environment (create one with Rufus or BalenaEtcher).
Method 1: Use OS‑Uninstaller (Easiest)
The Ubuntu community maintains OS‑Uninstaller, a free GPL tool that automates the removal process. It works from a live Ubuntu session and supports Windows, macOS, and other Linux distributions.
- Boot your computer from a live Ubuntu USB (the same version you used to install Ubuntu).
- Open a terminal and add the Boot‑Repair PPA:
sudo add-apt-repository ppa:yannubuntu/boot-repair - Update and install OS‑Uninstaller:
sudo apt update sudo apt install -y os-uninstaller && os-uninstaller - The tool launches. Select the OS you want to remove (Ubuntu), click OK, confirm the popup, then click Apply.
- After removal, reboot the machine. On a single‑boot system you may see a GRUB prompt—just remove the live USB and the disk is empty. On a dual‑boot system you may need to restore the Windows bootloader (see the bootloader section below).
OS‑Uninstaller is the quickest path when you want a guided, point‑and‑click removal. The tool is open source and officially linked from the Ubuntu Community Help Wiki.
Method 2: Manual Partition Deletion (Full Control)
If you prefer hands‑on control or your live session does not have internet access, you can delete Ubuntu’s partitions using the built‑in partition manager (GParted or Disks).
- Boot the live Ubuntu USB.
- Open a terminal and identify your disks:
sudo fdisk -l lsblk -fLook for ext4 partitions with labels like
ubuntuor a size matching what you assigned to Ubuntu. The EFI System Partition (ESP) is typically a small FAT32 partition. - Launch GParted (search in the application menu).
- Right‑click each Ubuntu partition (/, swap, /home if separate) and choose Delete. Do not delete the ESP or Windows partitions unless you are wiping the whole disk.
- Click the green checkmark to apply the changes.
- Close GParted and proceed to bootloader cleanup if needed.
| Partition Type | Typical Label / Size | Action |
|---|---|---|
| EFI System Partition (ESP) | 100‑500 MB FAT32, often labeled EFI | Keep (delete only the Ubuntu folder inside it) |
| Ubuntu root (/) | 10‑30 GB ext4, often labeled ubuntu | Delete |
| Ubuntu /boot | 500‑1000 MB ext4, labeled boot | Delete |
| Ubuntu swap | Size equal to RAM, no label | Delete |
| Ubuntu /home | Remaining space, ext4, labeled home | Delete |
| Windows system partition (C:) | NTFS, labeled Windows | Keep |
| Windows recovery partition | 500‑1000 MB NTFS, no label | Keep |
Method 3: Remove Ubuntu from a Windows Dual Boot
If you installed Ubuntu alongside Windows 10 or 11, you can perform the removal from within Windows after deleting the Ubuntu partitions. This is the most common scenario for users who want to reclaim disk space.
- Open Disk Management in Windows (press
Win + Xand choose Disk Management). - Locate the Ubuntu partitions—they will appear as unallocated or as ext4 volumes. Right‑click each Ubuntu partition and select Delete Volume.
- Now restore the Windows bootloader. Open a command prompt as Administrator and run:
diskpart list disk select disk 0 list partition select partition 1 (the EFI System Partition) assign letter=Z exit - Navigate to the EFI folder on the Z: drive and delete the ubuntu folder. Then remove the drive letter:
mountvol Z: /d - Reboot. Windows should boot directly. You can now extend the Windows partition into the freed space using Disk Management.
Important: On older systems with legacy BIOS, you may instead need to run bootrec /fixmbr from a Windows recovery environment.
| Boot Scenario | Bootloader Repair Action |
|---|---|
| UEFI + Windows only | Delete Ubuntu folder from ESP, reassign letter, remove letter |
| Legacy BIOS + Windows only | Run bootrec /fixmbr from Windows Recovery Environment |
| UEFI + both Windows & another Linux | Delete Ubuntu folder, then update GRUB from the other Linux install |
| Single‑boot Ubuntu (no other OS) | No bootloader repair needed; disk is empty after partition deletion |
| Legacy BIOS + only Ubuntu removed | Boot‑Repair-Disk’s “Restore MBR” option |
What to Do After Erasing Ubuntu
Once the partitions are gone and your bootloader is fixed, the freed unallocated space is ready for reuse. Create a new partition to install Windows or another OS, or extend your existing partition into the space. On Windows, right‑click the adjacent partition in Disk Management and choose Extend Volume.
For a clean single‑disk system that will stay empty, you can leave the partitions deleted; the computer will boot from a USB or network.
References & Sources
- Ubuntu Community Help Wiki. “OS-Uninstaller” Official documentation for the automated removal tool.
- Ubuntu Discourse. “How do I COMPLETELY Uninstall Ubuntu server?” Forum guidance on manual partition deletion and disk identification.
- YouTube – It’s FOSS. “How to Uninstall Ubuntu 22.04 LTS” Visual walkthrough of the live‑USB partition deletion method.
- YouTube – Technical Lab. “How to safely remove Ubuntu (Linux) from dual boot in Windows 10/11” Steps for Windows‑based removal and bootloader repair.
