How to Merge Unallocated Space into Your C: Drive (Using Command Prompt)
(Suggested Featured Image: A split image showing a nearly full C: drive on one side and a healthy, spacious one on the other.)
Is your C: drive flashing that dreaded red "Low Disk Space" warning? It’s a common headache, especially as applications and updates grow larger. While moving files can help, sometimes you need a more permanent solution.
If you have a separate partition (like a D: drive) right next to your C: drive, you can actually merge them to give your system room to breathe. Today, we’re diving into the powerful Diskpart utility in the Command Prompt to do just that.
⚠️ A Critical Warning Before We Begin
This process involves deleting a partition. This will erase all data on it permanently.
BACK UP EVERYTHING from the partition you plan to delete to an external hard drive or cloud storage.
The unallocated space you create must be immediately to the right of your C: drive to be merged. The
extend
command cannot jump over other partitions.
(Image Suggestion: A simple diagram showing a C: drive, then an empty space (unallocated), then another partition. A red "X" over the second partition, indicating it can't be used if it's not contiguous.)
[Diagram: C: Drive | Unallocated Space | D: Drive] -> ✅ CAN BE EXTENDED
[Diagram: C: Drive | D: Drive | Unallocated Space] -> ❌ CANNOT BE EXTENDED
If you're backed up and ready, let's get started.
Step-by-Step Guide: Merging Partitions with Diskpart
Step 1: Open Command Prompt as Administrator
We need elevated privileges to make these system-level changes.
Click the Start button or press the Windows key.
Type
cmd
.Right-click on Command Prompt and select Run as administrator.
Click Yes when the User Account Control (UAC) prompt appears.
(Image Suggestion: A screenshot of the Windows Start menu with "cmd" typed, highlighting the "Run as administrator" option.)
https://i.imgur.com/example-admin-cmd.png
Step 2: Launch the Diskpart Utility
In the black Command Prompt window, type the following command and press Enter:
diskpart
A new prompt saying DISKPART>
will appear. This is your signal that you're now inside the disk partitioning tool.
Step 3: Identify Your Disks and Partitions
We need to see the layout of your storage.
To list all the physical disks, type:
list disk
You'll see a list like the one below. Identify the disk that contains your C: drive (usually Disk 0). Note its number.
(Image Suggestion: A screenshot of the
list disk
command output, with an arrow pointing to "Disk 0".)Select that disk (replace
0
with your disk number if different):select disk 0
Now, list the partitions on that disk to see the current layout:
list partition
This is the most important view. Identify your C: drive partition and the partition you wish to delete (e.g., D: drive). Note their partition numbers.
Step 4: Delete the Target Partition (This Erases Data!)
This is the point of no return. Double-check you've backed up the data!
Select the partition you want to delete (replace
Y
with its number):select partition Y
Delete it. This command will immediately wipe the partition and turn it into unallocated space.
delete partition
Tip: If you get an error, the partition might be in use. Try the command
delete partition override
.
Step 5: Extend Your C: Drive
Now for the rewarding part—adding that space to your C: drive.
First, select your C: drive volume:
select volume C
Finally, extend it into the now-available unallocated space:
extend
The
extend
command will automatically use all contiguous unallocated space to the right.
Step 6: Exit and Confirm
You're all done! Exit the Diskpart utility and then close the Command Prompt window.
exit
Then type exit
again to close the Command Prompt.
Open File Explorer, and you should see your C: drive looking much healthier with its newfound free space!
Comments
Post a Comment