How to use Diskpart to clean and format a Drive in Windows 10

Description: This article will show how to use the Diskpart tool in Windows 10 to clean and format a drive.

  1. From the start menu search box search for command prompt. Right click on the command prompt app that comes up and then select Run as administrator.
    start menu, command prompt, run as administrator
  2. Type diskpart then press enter.
    command prompt, diskpart
  3. Type list disk then press enter - this will show a list of drives in the system, starting with Drive 0. Carefully check for the actual disk number that is to be cleaned - if the wrong disk is selected here, all data will be lost on that disk.
    command prompt, diskpart, list disk
  4. Type select disk followed by the number of the drive that is to be cleaned, and then press enter - example: select disk 1. There will be a confirmation message stating what is now the selected disk. Double check if this is the drive to be cleaned.
    command prompt, diskpart, select disk
  5. Type clean then press enter. This will completely remove any data or formatting on the drive.
    command prompt, diskpart, clean drive
  6. Type create partition primary then press enter. This will add a partition to the drive and make it accessible.
    command prompt, diskpart, create partition on drive
  7. Format the drive by typing format fs=NTFS or format fs=FAT32 depending on which file system you want to use.
    command prompt, diskpart, format drive
  8. Type assign then press enter to assign a drive letter. The drive will now show up with a drive letter.
    command prompt, diskpart, assign a drive letter

Technical Support Community

Free technical support is available for your desktops, laptops, printers, software usage and more, via our new community forum, where our tech support staff, or the Micro Center Community will be happy to answer your questions online.

Forums

Ask questions and get answers from our technical support team or our community.
PC Builds
Help in Choosing Parts
Troubleshooting

Knowledge Base

Helpful articles written by Micro Center Experts.
ESET
Windows

Sign in for the best experience

Access helpful features and personalize your experience - Sign in or create an account now

Sign In
Don't have an account? Create Account