In this, we'll walk you through the steps to use DiskPart to successfully clean, format, label, and assign a drive letter using the Command Prompt. How to use DiskPart to clean and format a drive Important: Using DiskPart will completely erase everything on the drive you select, making it impossible to undo any changes. It's crucial that you correctly choose the drive you want to clean and format. We always recommend making a. • Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (Admin). • Connect the drive you want clean and format to your computer. • Type the following command and press Enter: diskpart • Type the following command to list all the available drives and press Enter: list disk • Take your time and very carefully, on the output from the previous command, identify the drive you want to clean.