# Removing Windows to Install Linux

> Linux Installation Fixing Device is Active Error When Installing Over Windows

When This Guide is Needed

Youll need this guide if

Source: https://knowledgebase.frame.work/en_us/removing-windows-to-install-linux-Sk8NZwSLex

Last updated: 2025-07-16T17:43:38.347Z

## Linux Installation: Fixing "Device is Active" Error When Installing Over Windows

###   

### When This Guide is Needed

  

You'll need this guide if:

*   You're installing any Linux distribution over an existing Windows 10/11 installation
*   The installer's "Reclaim Space" or "Delete Partitions" option fails with "device is active" errors
*   You can't delete or modify partitions through the graphical installer
*   The installer won't proceed because it can't access the disk

###   

### Why This Happens

  

Windows 11 doesn't fully shut down by default - it uses "Fast Startup" which leaves the filesystem in a hibernated state. Additionally, BitLocker encryption, UEFI boot entries, and Windows system partitions can all prevent Linux installers from modifying the disk.

  

### Solution: Manual Partition Removal

  

### Getting Ready:

  

*   #### Linux installation USB/DVD (already booted)
    
*   Backup any important data (this will DELETE everything on the disk)

####   

### Steps in order:

  

**1\. Open a Terminal**

  

*   Look for Terminal or Konsole in the installer's menu/dock
*   Or right-click on desktop and select "Open Terminal"
*   Or press Ctrl + Alt + T (works in many distributions)

**2\. Identify Your Disk**

  

lsblk

*   Look for your NVMe drive (usually /dev/nvme0n1)
*   Verify the size matches your drive
*   You'll see partitions listed as nvme0n1p1, nvme0n1p2, etc.

**3\. Clear the Disk Completely**

  

sudo fdisk /dev/nvme0n1

  

Then inside fdisk:

p     # Print partition table (verify this is the right disk!)
d     # Delete partition
1     # Partition number (repeat 'd' for each partition)
d
2
d
3
# Continue until all partitions are deleted
w     # Write changes and exit

####   

**4\. Alternative: Nuclear Option**

  

If fdisk doesn't work, wipe the partition table entirely:

sudo dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=1

This destroys the partition table completely.

**5\. Continue Installation**

*   Close the terminal
*   Click refresh/rescan in the installer if available
*   Or restart the installer application
*   The disk should now appear as unallocated/free space
*   Proceed with normal installation

### Important Notes

  

*   ### **This permanently deletes ALL data on the disk**
    
*   Double-check you're targeting the correct disk with lsblk
*   If you have multiple NVMe drives, verify the correct one (nvme0n1, nvme1n1, etc.)
*   Some distros may require 'sudo -i' or 'su' for root access

###   

### Prevention for Future Installs

  

If dual-booting or planning to switch:

1.  Disable Fast Startup in Windows Power Options
2.  Turn off BitLocker encryption
3.  Run 'shutdown /s /t 0' in Windows for a full shutdown
4.  Consider using Windows' own diskpart tool with clean command before booting Linux
