guide · static export
PC · disk

Extend C When the Free Space Is Not Next to It

Windows refuses to extend a volume because a recovery partition sits between it and the unallocated space. Disabling WinRE tempers the problem: the protected partition becomes deletable, and WinRE moves back into Windows afterwards.

by@guidox updated:10/31/26 time:30 min level:Advanced tested on:Windows 11 24H2 works on:Windows 10, Windows 11 tools:PowerShell as administrator, Diskpart
TL;DR

Check the layout with **Get-Partition**, disable WinRE with **reagentc /disable**, delete the recovery partition in diskpart with **delete partition override**, extend C:, then re-enable WinRE with **reagentc /enable**.

Before you start

Requirements

  • Admin rights
  • A backup of the partition table layout
  • 30 minutes
Step by step

Instructions

01

Read the order of the partitions

**Get-Partition** shows offset and size, which is the only reliable way to see whether the free space is really behind C:. A recovery partition in between is the usual blocker.

Get-Partition -DriveLetter C | Select-Object PartitionNumber,Offset,Size,Type
Get-Partition | Select-Object PartitionNumber,DriveLetter,Offset,Size,Type | Sort-Object Offset
Get-Disk | Select-Object Number,Size,LargestFreeExtent
02

Confirm WinRE lives on that partition

**reagentc /info** names the recovery partition and its state. Do not delete anything until the output says the WinRE image is on the partition you plan to remove.

reagentc /info
Get-Partition | Where-Object Type -eq 'Recovery' | Select-Object PartitionNumber,Size,Offset
⚠ warningA Windows update can leave a second, larger recovery partition behind at the end of the disk. Read every row before choosing which one to touch.
03

Take the layout down on paper

A screenshot is not enough if the machine does not boot afterwards. Write the partition table and the WinRE state to a file you can read from another device.

New-Item -ItemType Directory C:\DiskLayout -Force | Out-Null
diskpart /c "list disk" > C:\DiskLayout\disks.txt
diskpart /c "select disk 0" /c "list partition" > C:\DiskLayout\parts.txt
reagentc /info >> C:\DiskLayout\re.txt
04

Disable and delete the blocker

**reagentc /disable** moves the image into the running system and releases the partition. A recovery partition keeps a protected type, so diskpart needs the **override** keyword to delete it.

reagentc /disable
diskpart
select disk 0
select partition 4
delete partition override
exit
⚠ warningDeleting the wrong partition number destroys data. Match the number against the list from step 1, not against a memory of the layout.
05

Extend and re-enable recovery

With the space now adjacent, **extend** grows C: without moving a single file. Afterwards **reagentc /enable** puts a working recovery environment back — in a folder on C:, not in a new partition.

diskpart
select volume C
extend
exit
reagentc /enable
reagentc /info
tip**extend** uses all adjacent unallocated space by default. Pass **size=102400** to stop at 100 GB instead.
06

Verify the result on both sides

The volume must show the new size and WinRE must report a hard disk location again. Check both, because a working C: with a disabled WinRE is a machine without recovery options.

Get-Volume C | Select-Object DriveLetter,Size,SizeRemaining
Get-Partition | Select-Object PartitionNumber,DriveLetter,Type,Size
reagentc /info
Troubleshooting

Common issues

extend still says there is not enough space

Another hidden partition of a few megabytes is sitting in the gap. List every partition with its offset and check what lies between the end of C: and the unallocated block.

delete partition override fails

The partition is in use by WinRE. Run reagentc /disable first and confirm with reagentc /info that the state reads Disabled.

reagentc /enable reports 0x8007007b

The recovery image is gone or the path in the WinRE configuration is invalid. Restore winre.wim from the installation media, or leave WinRE disabled and use a USB recovery drive instead.

The machine will not boot after the change

The wrong partition was deleted. Restore the layout from the text file in step 3 with diskpart, or boot the installation media and use its repair options.

FAQ

Frequently asked

Can I shrink the space in front of C: instead?

No. Windows can only extend into unallocated space that follows the volume; moving a partition to the left needs third-party tooling.

Do I lose the recovery environment for good?

No. WinRE lives in C:\Windows\System32\Recovery after re-enable and starts from there.

How to undo this

Shrink the volume with diskpart shrink, then run reagentc /disable and reagentc /enable to restore a recovery environment. Recreating the deleted partition with its exact type and size is only possible from the layout notes.

Changelog · 1 entry
  1. 2026-10-31
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress