If your storage devices; internal or external hard drives, USB flash drives or SD cards are corrupted, formatting it is the most obvious solution. But at times, Windows does not allow you to format the drive. In such cases, a potential solution is to use Diskpart and remove partitions. After which Windows will let you format the drive.
How to use Diskpart?
Let us see how to use Diskpart in the following steps. First, make sure the external storage device you want to clean using Diskpart is connected to the computer.
- Press Windows + X to open the power user’s menu and select Command Prompt (Admin)
- Enter the admin login and password to launch a command prompt
- Type ‘diskpart’ and hit Enter
- Type ‘list disk’ for diskpart to list all the disks associated with the computer and hit Enter
- Once the drives are listed, identify the drive in question by paying attention to the size of the disk. Take extra caution as choosing a wrong drive may cause unintentional deletion.
- Type ‘select disk number’ where the number is the disk number
- Now that the disk is selected, any command you give will be applicable to the selected disk
- Type ‘clean’. This command will wipe the contents of the entire drive, so be sure you’ve selected the right disk in step 5 and data is backed up.
You will see a success message that the disk is cleaned and you’re done. Now that the disk is cleaned using Diskpart, you should be able to format and use it.
How to the format the volume after removing partitions?
Formatting can be done using the built-in tool called Disk Management.
- You can launch Disk Management in the same way as you did Diskpart. Just press Windows + X and click on Disk Management
- You will see that the disk is shown as ‘Unallocated space’ as the partitions are removed
- Right click on Unallocated space and select ‘New Simple Volume’
- Then choose a ‘name for the volume’ and ‘select a file system’
- Click Format and your volume will be formatted and ready for use.
This method of using Diskpart to clean the drive and formatting it later resolves the issue in most cases. If however, the issue still persists, the drive may be physically damaged and may have to be replaced.
With SD cards, you can face other errors such as ‘Blank SD card’, ‘unsupported file system’, ‘SD card shows 0 bytes’ etc. In such cases, formatting is the way to go, but you run the risk of data loss issues. Your best course action instead should be to recover data from the card using recovery programs such as Remo Recover. And then proceed with formatting. If you want more details on the process of recovering data from such cards, refer blank sd card recovery.