DiskPart clean removes partition and volume info, making data inaccessible but not securely erased. 1. Open Command Prompt as Admin and run diskpart. 2. List disks and select the correct one. 3. Run clean to wipe partitions. 4. Create new partitions and format the drive if preparing for Windows. Double-check the selected disk to avoid accidental data loss.
If you're trying to wipe a drive completely and prepare it for a fresh start, DiskPart is a solid built-in tool in Windows that can get the job done. It’s especially useful if you’re repurposing a drive, troubleshooting boot issues, or just want to make sure all data is removed before handing off a device.

What DiskPart Clean Does
When you run diskpart clean
, it removes partition and volume information from a selected disk. This doesn’t securely erase your files in a way that makes them unrecoverable — but it clears out the structure so the disk appears blank and unpartitioned. This is often the first step before reinstalling Windows or formatting a drive from scratch.
Be warned: this action is irreversible without data recovery tools, and it will make any data on the drive inaccessible immediately.

How to Use DiskPart to Clean a Drive
Before jumping into DiskPart, make sure you’ve backed up anything important. Here's how to proceed:
- Open Command Prompt as Administrator.
- Type
diskpart
and press Enter. - Run
list disk
to see which drives are connected. - Select the correct disk using
select disk X
(replace X with the correct number). - Finally, type
clean
and hit Enter.
Once the process finishes, the drive will be wiped of partitions and ready for new ones.

Choosing the Right Disk Matters
DiskPart won’t warn you twice — once you run the clean
command, there’s no confirmation prompt. So double-checking the selected disk is critical.
A common mistake is selecting the wrong disk, especially if you have multiple internal drives or external USB drives plugged in. If you're unsure, disconnect other drives before starting. You can also check disk sizes using the list disk
output to help identify the right one.
What to Do After Cleaning the Drive
After running clean
, the disk will show up as "Unallocated" in Disk Management. From here, you can create new partitions using DiskPart or another tool like Disk Management or a third-party utility.
If you're preparing for a Windows install, you can continue in DiskPart:
- Use
create partition primary
to make a new partition. - Then format it with
format fs=ntfs quick
. - Assign a drive letter with
assign
.
You’ll then have a usable drive again, free of old partitions and ready for use.
That’s about it. The process itself is straightforward, but the potential consequences of targeting the wrong disk make it worth going slow and checking every step.
The above is the detailed content of how to use diskpart to clean a drive. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this post, you’ll learn how to translate a web page in Google Chrome on desktop or mobile, how to adjust Google translation settings, how to change Chrome language. For more Chrome tips, computer tips, useful computer tools, you can visit php.cn S

Esentutl.exe is an executable file, playing a significant role in Windows system. Some people find this component lost or not working. Other errors may emerge for it. So, how to fix the esentutl.exe error? This article on php.cn Website will develop

This tutorial teaches you how to delete TikTok account permanently from your device. You can go to your TikTok account settings to easily delete your account. After you delete the account, it will be deactivated for 30 days and be permanently deleted

TheAlienwareAG275UXMdeliversstrongcoloraccuracyandwidegamutcoveragesuitableforbothcreativeworkandgaming.1.Itoffersfactory-calibratedcoloraccuracywithΔEbelow2,oftenreachingΔE

If you can’t see the font or the graphics on your computer screen, you can zoom in on Windows 10 for a better view of the screen. Do you know how to zoom in on PC? It is not difficult. In this post, php.cn Software will show you how to zoom in on you

In your Windows Settings or you main full-screen, you may see the “your version of Windows has reached end of service” message. What does it mean? How to remove this message? This post from php.cn tells the details for you.

What is NTLite used for? How do I debloat an ISO in Windows 11? If you want to debloat Windows 11 before installing it, you can run NTLite to create your own Lite Edition. In this post, php.cn will guide you NTLite Windows 11 download and how to use

Hogwarts Legacy has caught many players’ eyes since its debut. New games will have many issues that need optimization at launch and Hogwarts Legacy is no exception. In this post on php.cn Website, we will show you how to fix Hogwarts Legacy not using
