How to Use DiskPart to Clean and Format Drive Not Working on Windows 10

Is your USB flash drive or external hard drive corrupted/inaccessible and refuses to format perfectly on your Windows 10? If your answer is yes, DiskPart can prove to be the well-timed savior for you. For those unfamiliar, the DiskPar is a well-known command-line tool designed to wipe and restore the storage to working condition. Notably, it’s more powerful than tools like Disk Management or Format in File Explorer, especially when dealing with logical errors or uninitialized drives. Having said that, let’s learn how to use the DiskPart to clean and format drive not working on Windows 10.

Before moving any further, I’d like to reiterate that these steps will erase everything on the selected drive. Therefore, make sure to always back up important data without fail.

Understanding Partition Styles: MBR vs GPT

To ward off any confusion, it’s important to have a clear understanding of the MBR and the GPR partition styles.

  • MBR (Master Boot Record):
    • Traditional format.
    • Compatible with legacy BIOS systems.
    • Limited to drives under 2TB and four primary partitions.
  • GPT (GUID Partition Table):
    • Modern standard for UEFI systems.
    • Supports drives larger than 2TB and more than four partitions.
    • More robust and reliable than MBR.

Prerequisites Before Proceeding

  • Back up any important data.
  • Disconnect unnecessary drives to avoid accidentally erasing the wrong drive.
  • Know whether you want the drive to be MBR or GPT formatted.

How to Fix Drive (MBR) Problems with DiskPart on Windows 10

Now, go through the below steps to fix issues on an MBR partition style drive on your PC.

  • To get going, open Start menu on your Windows.
  • After that, search for Command Prompt, right-click the top result, and select Run as administrator.
Launch Command Prompt on Your Windows PC
  • Type diskpart and press Enter.
Use diskpart on Windows 10
  • Now, you need to type list disk and press Enter to list all connected drives.
  • Up next, type select disk DISK-NUMBER and press Enter.
    (Replace “DISK-NUMBER” with the actual number of the drive you want to fix.)
  • Then, make sure to type clean and press Enter to wipe the drive.
  • Type list disk again to confirm the selected drive has an asterisk (*).
  • (Optional) To convert the drive to MBR (if needed), type:
    convert mbr
  • Create a new partition by typing:
    create partition primary
  • Select the new partition:
    select partition 1
  • Set the partition as active (required for MBR only):
    active
  • Format the partition (replace values accordingly):
    format fs=ntfs label=myData quick
  • Assign a drive letter (replace with your preferred letter):
    assign letter=g
  • Exit DiskPart:
    exit
  • Close Command Prompt:
    exit

How to Fix Drive (GPT) Problems with DiskPart on Windows 10

Keep in mind that if your drive uses GPT partition style, take the following route carefully.

  • On your PC, head over to Start > then, search for Command Prompt > right-click the top result, and choose Run as administrator in the menu.
Launch Command Prompt on Your Windows PC
  • Now, type diskpart and press Enter.
Use diskpart on Windows 10
  • After that, type list disk and press Enter to view active drives.
  • Next, type select disk DISK-NUMBER and press Enter.
    (Replace “DISK-NUMBER” with your actual drive number.)
  • Next up, type clean and press Enter to wipe the drive.
  • Confirm the correct drive is still selected with list disk.
  • Convert the drive to GPT:
    convert gpt
  • Create a new primary partition:
    create partition primary
  • Select the new partition:
    select partition 1
  • Format the partition (replace values accordingly):
    format fs=ntfs label=myData quick
  • Assign a drive letter (replace accordingly):
    assign letter=w
  • Exit DiskPart:
    exit
  • Finally, close Command Prompt:
    exit

Wrapping up…

And that’s pretty much it! After completing the above steps, your drive should now be accessible in File Explorer. Be warned that if the problems still persist after cleaning and formatting, there is a high chance your drive may have hardware issues and might need replacement. It’s also worth highlighting at the end of this article is that Microsoft has already ended the support for Windows 10 on October 14, 2025.

Posted by
Rashmi Mishra

Founder/CEO: Rashmi Mishra is a new-age entrepreneur and a die-hard tech lover. Though Rashmi has a special liking for iPhone, MacBook, and Apple Watch, she loves to take the hottest Android smartphones and Windows laptops for a spin. When she is not reading stories that are breaking the Internet, you will find her either crafting designs or fixing lives for good!

Leave a Reply

Your email address will not be published. Required fields are marked *