Diskpart Clean Command

Diskpart Clean Command
  • Jan 12th, 2024
  • Abhishek Chauhan
  • Computer
    • Share :

Want to know how to clean dispart through the command prompt? If yes, then read this article carefully to know about it.

What Is Diskpart?

Do you know what a disk part is? If not, then read the information about this listing forward.

Diskpart is a command-line utility used to manipulate disk partitions in all Windows and Windows Server versions from Windows XP to Windows Server 2003.


The disk part command helps manage computers or laptop drives such as disks, partitions, volumes, or virtual hard disks. You have to list or select the disk for the command to function.


To clean the disk part using a command prompt, follow these simple steps -:

Step 1-: Turn on your laptop.

Before moving forward to the steps to clean the disk, check if it has errors or if the disk you want to clean. To check it, read out the below-mentioned points -:

·         Open the Disk Management from the settings under the task bar and locate the disk part.

·         Check the disk part in the partition table or box you want to clean.

Also Read: 6 Best Ways to Repair Laptop Battery at Home?

Also Read: How To Share Mobile Screen On Laptop

For example,

Suppose you choose the disk named disk5  3TB with MBR; then you will see the content of that disk in the form of a partition table on the screen.

Step 2 -To clean the disk part, click the Start icon and go to the menu list.

Step 3-Search for the command prompt in the der Accessories option from the menu list.

Step 4-: Now select "Run as Administrator" under the command prompt section.

Step 5 -:  This will open the page of the command prompt search box.

Step 6-: Type diskpart in the box and press the Enter button from the keyboard.

Step 7 -:  Type "list disk" on the disk part prompt page. This will list all the hard drives or disks on the laptop system.

Step 8 -Search and select the disk you want to clean and click on it. If You can find a free space option on the disk drive, it states that " some space is available for the use on the drive but has no volume defined." If you don't find that option and see an opportunity off volume defined, there is zero free space in the drive.

Step 9 -Make sure about the serial number or any disk identity you want to clean. If you choose the wrong disk, the data or information from that disk will be erased permanently.

Step 10-: Select the disk you want to clean and click on the clean option after typing clean at the command prompt.

Step 13-: Press enter on the keyboard to clean the selected disk.

Step 14 -: The selected disk is cleaned, and you can use its free space.

Step 15 -: Go back to the disk management option to recheck the disk.

Step 16 -: Now you can see the list of available disks. The highlights "Unknown" and "Not Initialized" terms are in the list of cleaned disks with space. 

Also Read: 


This is how you can easily clean a disk part by using a command prompt.

Frequently Asked Questions

Laptop Repair | Computer Repair | Printer Repair

It depends on the data or information. If there is no free space on the disk then it will be a little long moment to clean.

Yes, cleaning the diskpart can delete all the data and files from the drive.

Make sure about the disk before selecting it to clean. If you choose it then all the data and information will be erased from the disk drive.

Diskpart is a command-line utility that is used to manipulate disk partitions in all versions of Windows, Windows Server from Windows XP to Windows Server 2003.

The diskpart command helps in managing computers or laptops drives such as disks, partitions, volumes, or virtual hard disks. You have to list or select the disk for the functioning of the command.
Still confused ? - Our experts are just one click away !
Connect with our team of skilled professionals to explore your laptop requirements and discover the ideal NSS Laptop Services tailored to your needs. Alternatively, feel free to reach out, and we'll respond promptly within one business day.
Your satisfaction is our priority, and we're here to assist you every step of the way.
Repair your Laptop Anytime and Anywhere
+91-97171 50098