In a galaxy (Windows) "Millenium" away, for hard disk drive (hdd) partitioning maintenance tasks, I used to rely on third party (alright - "stolen") applications installed on Windows.

Cloning tasks where relegated to Gparted, booted off an "old" CD.

Since XP-Vista, I got into "diskpart", Microsoft's "barebones" partition editor.

diskpart is good for basic NTFS (doh! what else?!) hard disk drive partitioning tasks ('though I still prefer Gparted for offline disk/partition editing, etc.).

Today I'll show you how I shrunk one of my Hard Disk Drives with diskpart in 3 simple steps.



  • Here's how you'd shrink a partition with diskpart on a Command Prompt (or PowerShell) as Admin:

select disk 1
select partition X
shrink DESIRED=65535



My hdd is a traditional 250GB one, with Windows 7 SP1.

The below commands will work on every Windows after XP, so I'm expecting for the commands to work without any modifications on Windows Vista, Windows 8, 8.1 and Windows 10.

Back to my scenario - When you install Windows on a blank MBR hdd, by default, the Windows installer creates:

  1. One 100 MB "System Partition".
  2. One 223 GB "Windows Partition".
  • My objective is to reduce the 223 GB Windows partition in size.

To make a smaller Windows Partition, you'd rely on the "shrink"-diskpart command.


diskpart requirements.

To get such a delicate command to work, you first have to be 100% sure on what you want to achieve.

Namely, you'll have to:

  1. Make sure your partition is NTFS.
  2. Your hdd has enough available space (ie. how much GBs do you require?).
  3. (Optional - as a precaution) Defrag & Chkdsk the partitions involved before running any command(s).
  4. (Optional) Run a zero-fill tool (such as sdelete or precompact).
  5. (VERY IMPORTANT!) Know the right disk and partition No.s.


  • You can obtain (handy!) visual information by looking at your hdds from the Disk Management Applet (diskmgmt.msc).


Step 1. diskpart hands-on — disk selection.

Now that you are 100% sure that you satisfy the requirements, run a new command prompt "As Administrator" and type "diskpart".


Type "list disk" on diskpart to obtain a list of the hdds connected to your system:

list disk

You will notice that the "disk ###" (No.s) list reflects those of Disk Management (diskmgmt.msc).

To shrink your partition, you'll have to select the hdd containing the partition first.


select disk 1

The above commands focuses your next actions on disk 1.

In the above screenshot example, you will notice I have selected disk 1 (223GBs in size).


Step 2. diskpart hands-on — partition selection.

Since partitions are located within disks (!), now type:

list partition


You will get a list of the partitions stored within "disk 1".

In the above pic, you'll notice the partition 2 was selected (still reported as 223 GB because the partition uses pretty much the whole disk).

So now Type:

select partition 2

To select the partition No. 2.

The "select"-command (used in conjunction with the "partition" keyword), allows you to perform partition-related maintenance.

At this stage, you can shrink, extend or delete the partition - to receive a full list of possible commands, simply type "help".


Step 3. diskpart hands-on — actual partition shrinking.

At this point you'll have to specify how many GBs you wish to "free/release/deallocate" from your NTFS partition.

  • IF you care to read, please refer to the instructions posted by the below screenshot.
  • IF you have no time to read and you only want that extra ~63GB to install Linux, jump further below.


To shrink your partition, type:

shrink DESIRED=65535

  • The above command will shrink your hdd by 63GBs.

In other words, you'll end up with an extra 63GBs of unallocated space.

Now feel free to install Ubuntu on it!

Senior Professional Network and Computer Systems Engineer during work hours and father when home.

Andrea strives to deliver outstanding customer service and heaps of love towards his family.

In this Ad-sponsored space, Andrea shares his quest for "ultimate" IT knowledge, meticulously brought to you in an easy to read format.

3 easy steps to reduce hdd partition size with diskpart
5 (100%) 1 vote

Ask me anything