In the Disk Management console, the “Delete Volume” option may be dimmed out in the right-click menu for USB flash drives. So, users may be wondering how to remove one or more partitions in the external USB drives.
Cause
The “Delete Volume” option may be missing if the page file (pagefile.sys
) exists in the partition, or the disk contains an Operating System.
If you look at the image above, you can see that a Page File exists in the D: drive — denoted by the line Healthy (Page File)
. Hence the Delete Volume option is grayed out.
This article explains how to delete the volume on a USB drive if the option is missing in Disk Management.
“Delete Volume” Disabled for USB Drives in Disk Management
1) Disable paging file on the USB drive
Windows allows users to set a page file on external USB hard drives, but not for USB thumb (or flash) drives. To be able to delete a USB drive partition, the first step is to disable the paging file on that drive. To do so, follow these steps:
- Right-click Start, click Run.
- Type
sysdm.cpl
and click OK. - Click Advanced
- Under Performance, click Settings
- Select the Advanced tab, and click Change
- Uncheck “Automatically manage paging file size for all drives” if it’s checked.
- Select the USB drive from the list (i.e., the drive from which you want to delete a partition)
- Select “No paging file,” and click Set
- Enable “Automatically manage paging file size for all drives.”.
(USB flash drives are not listed in the above dialog. External USB hard disks would show up, though. The above dialog shown only for illustration purposes.)
- Click OK. You’ll see the message: “The changes you have made require you to restart your computer before they can take effect.“
- Click OK, OK, to close all the dialog boxes.
- Restart Windows.
See if you’re able to delete a partition from your USB drive via Disk Management.
2) Delete Partitions on a USB drive using DiskPart
If you’re still unable to delete the USB drive partition using Disk Management, then you may try the DiskPart command-line tool to accomplish the task.
Warning: DiskPart is only for advanced users. It should be used only if you’re a person who knows what you’re doing. If you’re not confident running diskpart.exe, be sure to have proper drive image backup(s) in place before proceeding.
In this example, we’ll see how to delete one or all partitions on a USB flash drive using DiskPart.
Deleting a single partition
- Open an admin Command Prompt window.
- Type
diskpart
and press Enter. - Type
list disk
. This shows the list of physical disks on the computer.
- Identify the disk # for the subject USB drive — in this case, it’s Disk 2.
Caution: It’s extremely important that you select the right drive. Selecting the wrong disk can be disastrous! You may want to cross-verify the Disk # and Size via the Disk Management console.
- Type
select disk 2
(in this example, the USB drive isDisk 2
) and press Enter. - Type
list partition
and press Enter. - Let’s say you want to remove the 2nd partition in that disk, type
select partition 2
, and press Enter. - Type
delete partition
and press Enter. - Type
exit
to quit the DiskPart environment.
If you open the Disk Management console now, the deleted partition space will show up as Unallocated.
You may create one or more partitions from that unallocated space. Or, you can merge the entire free space with the other partition on the same disk.
Deleting all partitions
If you want to delete all the partitions using DiskPart, you need to use a different command. Follow these steps:
- Open an admin Command Prompt window.
- Type
diskpart
and press Enter. - Type
list disk
. This shows the list of physical disks on the computer.
- Identify the disk # for the subject USB drive — in this case, it’s
Disk 2
.Caution: It’s extremely important that you select the right drive. Selecting the wrong disk can be disastrous! You may want to cross-verify the Disk # and size via the Disk Management console.
- Type
select disk 2
(in this example, the USB drive is Disk 2) and press Enter. - Type
clean
and press Enter. This command deletes all the partitions in the chosen disk #.Optional Steps: Create a partition using DiskPart
You can create a new partition from that unallocated space, format it into NTFS or FAT32 as desired, and let Disk Management assign the next available drive letter automatically.
Optionally, if you want to create a partition using Disk Part (instead of Disk Management console), you can run these additional commands (4, 5, & 6) while you’re at the DiskPart command environment.
The commands 4-6 will create a single partition, utilizing the entire free space on the disk, format it into NTFS (Quick), and assign the next available drive letter.
list disk select disk 2 clean create partition primary format fs=NTFS QUICK assign exit
- Type
exit
to quit the DiskPart environment.
If you haven’t created a partition already (using DiskPart) or formatted the drive and assigned a drive letter, the entire space in that disk will show up as Unallocated.
Using Disk Management, you can create a partition and assign a drive letter as required.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!