Devices Clean Disk to Erase and Remove All Data and Partitions in Windows 11


Disk_reset_banner.png

This tutorial will show you how to clean (wipe) a disk drive to remove all partition (volume) formatting information on it to un-initialize and erase all data on the disk in Windows 10 and Windows 11.

When you clean a disk, the disk will show as "Unknown" and "Not Initialized" with "Unallocated" space afterwards. This will be a completely wiped out RAW disk ready to be initialized and create a new partition (volume) on the disk. Clean is a good option to quickly wipe and start fresh on a disk.

You can clean all a disk instead of clean to also secure erase the disk. Clean all specifies that each and every sector on the disk is set to zero, which completely deletes all data contained on the disk. It can take about an hour per 320 GB to finish running the "clean all" command on a disk. Clean all would be a good option to use before selling or trashing a disk.

References:

You must be signed in as an administrator to "clean" or "clean all" a disk.




Contents



EXAMPLE: "Unknown" and "Not Initialized" Disk with "Unallocated" space after "Clean" or "Clean all"

cleaned_disk.png





Option One

"Clean" or "Clean all" a Disk in Command Prompt


1 Open Windows Terminal (Admin), and select Command Prompt.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below step 4)

diskpart

3 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below step 4)

list disk

4 Make note of the Disk number (ex: "2") of the disk you want to "clean" or "clean all". (see screenshot below)

diskpart-clean_command-1.png

5 Type the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

select disk <number>

Substitute <number> in the command above with the actual disk number (ex: "2") you want to wipe from step 4 above.

For example: select disk 2


Be sure you use the correct disk number since this disk will be completely wiped making data on it unrecoverable.


diskpart-clean_command-2.png

6 Copy and paste the command below you want to use into Windows Terminal (Admin), and press Enter. (see screenshot below)

(Quickly clean disk)

> clean

OR​

(Clean and secure erase disk)

It can take about an hour per 320 GB to finish running the "clean all" command on a disk.


> clean all

diskpart-clean_command-3.png

7 When finished, you can close Windows Terminal (Admin) if you like.




Option Two

"Clean" a Disk in PowerShell


1 Open Windows Terminal (Admin), and select Windows PowerShell.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below step 3)

Get-Disk

3 Make note of the disk Number (ex: "2") of the disk you want to "clean". (see screenshot below)

Clear-Disk_PowerShell-1.png

4 Type the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

Clear-Disk -Number <DiskNumber> -RemoveData -RemoveOEM -Confirm:$false

Substitute <DiskNumber> in the command above with the actual disk number (ex: "2") you want to wipe from step 3.

For example: Clear-Disk -Number 2 -RemoveData -RemoveOEM -Confirm:$false


Be sure you use the correct disk number since this disk will be completely wiped making data on it unrecoverable.


Clear-Disk_PowerShell-2.png

5 When finished, you can close Windows Terminal (Admin) if you like.


That's it,
Shawn Brink


 
Last edited:
my concern

does this Rule work for SSD? (it's sure it works well on hdd)

usually I apply quick-format on SSD than full-format. it's significantly faster. less wear and tear.
 

My Computer

System One

  • OS
    Windows 7/11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP/Lenovo/Asus
    CPU
    Intel i7-11800H
    Motherboard
    Lenovo Legion 5i Pro Gen 6
    Memory
    32GB DDR4 3200MHz
    Graphics Card(s)
    NVIDIA GeForce RTX 3070
    Hard Drives
    1TB PCIe SSD
Use a special tool designed for ssd. The ssd manufacturer might have one on their site. Or use solidigm synergy or parted magic which reportedly work for all brands.
 

My Computers

System One System Two

  • OS
    Win7,Win11
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7,win11
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
my concern

does this Rule work for SSD? (it's sure it works well on hdd)

usually I apply quick-format on SSD than full-format. it's significantly faster. less wear and tear.
Using "Clean" on the SSD is fine, but if the SSD has its own tool, it would be better.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom