Is your hard drive showing problems lately while operating and not working properly? If yes, then your hard drive might have a logical issue or some kind of data corruption that can be solved using the Diskpart commands.
Microsoft’s Diskpart is a legacy command-line tool that helps you manage your computer’s hard drive’s operations like partitions, volumes, and virtual disks using Command Prompt.
In this tutorial, you’ll learn how to use the Diskpart command-line tool to clean and format a hard drive to fix the problems associate with your drive.
Note: Once you have clean the drive using the Diskpart command, your data on the selected drive will be permanently erased. So backup your important data before proceeding with the below steps.
Erase/Clean a Drive Through the Command Prompt Using Diskpart
1. Run Command Prompt as Administrator.
2. Once Command Prompt opens, type
Dispart and press Enter.
3. You will then see a new Diskpart command line, type
list disk and press Enter to see all available drives on your computer.
4. Now select the drive you want to clean by typing
select disk # (put the number of the drive instead of #) and press Enter.
5. Once you have selected the disk, type
clean and press Enter and wait for the process to complete.
7. Once your disk has been successfully erased, close the Diskpart.