|
 |
|
Disk - Clean and Clean All with Diskpart Command
How to "Clean" or "Clean All" a Disk with the Diskpart Command
Published by Brink
03 Jan 2010
|
 Published by |
|
|
How to "Clean" or "Clean All" a Disk with the Diskpart Command
 Information
This will show you how to use the clean or clean all command on a selected disk to delete all of it's MBR or GPT partitions, volumes, and any hidden sector information on MBR disks is overwritten.
The data on the HDD is not written over using the clean command like it does with the clean all command below. With the clean command, the data on the HDD is only marked as being deleted instead and is only written over when new data is written/saved to the same location on the HDD next.
OR
You could use the clean all command ( secure erase) to do the above and also have each and every disk sector on the HDD written over and zeroed out completely to securely delete all data on the disk to help prevent the data from being able to be recovered. "Clean All" takes about an hour per 320 GB to finish running.
 Note
- You cannot use the clean or clean all diskpart commands on a boot disk (ex: disk Windows is installed on) unless you do it from a command prompt at boot.
- Be sure to backup anything that you do not want to lose on the disk that you use clean or clean all on first. It will be to late afterwards. All data will be permanently lost on the disk.
 Warning
You do not want to use clean all on a SSD disk often. Having every sector written over to 0 on a SSD can reduce it's life span faster.
Here's How:
1. In Windows 7, open an elevated command prompt, or a command prompt at boot.
OR
2. In Windows 8 and 8.1, open an elevated command prompt, or a command prompt at boot.
 Note
Be sure that you have the correct Disk #. You would not want to wipe clean the wrong disk.
A) Press the Windows + R keys to open the Run dialog, type compmgmt.msc, and press Enter.
B) If prompted by UAC, click/tap on Yes.
C) Click/tap on Disk Management in the left pane, and make note of the disk # in the middle pane of the disk that you want to clean or clean all. (see screenshot below)
NOTE: For example, I would use Disk 1 if I wanted to use clean or clean all on my USB key drive. 
3. In the elevated command prompt, type diskpart and press Enter. (see screenshot below)
4. In the elevated command prompt, type list disk and press Enter. (see screenshot below)
NOTE: This will give you a list of disk numbers to select from.
5. In the elevated command prompt, type select disk # and press Enter. (see screenshot below)
NOTE: You would substitute # for the disk number listed that you want to use clean or clean all on. For example, I want to use one of them on Disk 1 (from step 1) for my USB key drive, so I would type select disk 1 and press Enter.
6. If the status of the selected disk # (ex: Disk 3) shows as Offline, type online disk, and press Enter to make it online. (see screenshot below)
7. Do either step 8 or 9 below for which command you would like to use.
8. To Use the Clean Diskpart Command
NOTE: (Recommended) See the green INFO box at the top of the tutorial for more information about this command. This command will wipe the HDD quickly.A) In the elevated command prompt, type clean, press Enter, and go to step 10 below. (see screenshot below)
NOTE: This will not take long to finish. Think of it as being like a quick format.
9. To Use the Clean All Diskpart Command
NOTE: See the green INFO box at the top of the tutorial for more information about this command. This command will wipe the HDD, and perform a secure erase. "Clean All" takes about an hour per 320 GB to finish running. It's best to only use this command if you wanted to help make sure that the data on the HDD cannot be recovered say when giving or selling the HDD to another person.A) In the elevated command prompt, type clean all, and press Enter, and go to step 10 below. You will see the command prompt below as is until the "clean all" command is finished. (see screenshot below)
NOTE: This will take quite some time (several hours or more) to finish depending on how large the disk is since it is writing over each and every sector on it to zero. Think of it as being like a full or low level format.
10. When finished, in the elevated command prompt, type exit and press Enter. Close the elevated command prompt.
11. The disk will be left as unallocated space. (see screenshot below)
12. You will now need to create a new partition or volume on the disk to be able to use it again.
That's it,
Shawn
|
|
|
|
|
03 Jan 2010
|
#1
|
|
|
I can remember zero filling drives only 13gb or less using a dos tool and that would take just about the entire day when you mention "full format"!
Nice and simple! This will be a help when going to wipe any flash drive as well.
|
My System Specs |
|
Computer type PC/Desktop
System Manufacturer/Model Number Custom builds = 2
OS W7 Ultimate x64/W10 Pro x64 dual boot main build-remote pc W10 Pro x64 Insider Preview/W7 Pro x64
CPU AMD Phenom II X4 975 Deneb 3.6ghz - 965 2nd remote pc
Motherboard Gigabyte GA-790XTA-UD4-Gigabyte GA-880GM-D2H remote pc
Memory Kingston Hyper X DDR3 1600 1.5v 16gb - Hyper X Fury 8gb 2nd
Graphics Card MSI HD Radeon 5750 1gb - MSI HD Radeon 6450 on mini tower
Sound Card Creative Labs X-Fi Xtreme Audio P - Realtek onooard 2nd case
Monitor(s) Displays ASUS VW199T-P 19" HP 2082a Main-HP 2082a 20" remote pc
Screen Resolution Asus 1440x900 - HP 1600x900
Keyboard AZIO L70 Backlit Letters Gaming - MS Comfort 3000 2nd build
Mouse MSI DS200 Programmable
PSU Corsair 750TX - primary / Corsair CX600 - second
Case Antec 900-2 - SSD compatible / NZXT Vulcan mini tower
Cooling Zalman CNPS9900A
Hard Drives Pending WD Heavy Duty PC/Mac/NAS/CCTVDVR = 2 to replace WD 1tb Black Edition Sata 3.0 = 2
WD 1tb Green Power HD In external enclosure temp internal install until new drives go in.
Internet Speed 30mbps upgrade - primary hard wired - mini tower usb WiFi
Antivirus GFI VIPRE Internet Security 2014 on W7 2016 beta on W10,
Browser Cyberfox, WaterFox 64bit FF variants, FireFox x64, Pale Moon
Other Info Accomdata fan cooled usb 2.0 PIDE/Sata II, III external enclosure.
Sambient usb/eSata PATA/Sata II, III external enclosure.
|
05 Mar 2010
|
#2
|
|
|
Hello Brink.
I just did this on my SSD and at first I thought to make the SSD "Offline" in disk management but in the command window it said that it could not "clean all" on a disk that's "Offline"; you may want to add a mention of this in the tutorial; I'm sorry I didn't think to get you a snip of it, but it should be easy to replicate.
It only took about 15 minutes to do a "clean all" on an 80GB SSD, not bad.
Thank you!
|
My System Specs |
|
System Manufacturer/Model Number * BFK Customs *
OS W 7 64-bit Ultimate
CPU Intel Q9550 Yorkfield
Motherboard ASUS P5Q Pro
Memory 8GB Dominator 8500C5D
Graphics Card ATI : XFX 5870
Sound Card Realtek HD Audio 7-1
Monitor(s) Displays 1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution 1920x1080P & 1920x1200
Keyboard Microsoft 500
Mouse Razer Diamondback 3G
PSU Corsair 620HX
Case Cooler Master RC-690
Cooling Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Hard Drives 1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
Internet Speed 14 Mb/s
Other Info 1x Koutech 3Gb/s SATA HDD Hot Swap Rack
|
05 Mar 2010
|
#3
|
|
|
Here's the snip, I re-did it for you.
|
My System Specs |
|
System Manufacturer/Model Number * BFK Customs *
OS W 7 64-bit Ultimate
CPU Intel Q9550 Yorkfield
Motherboard ASUS P5Q Pro
Memory 8GB Dominator 8500C5D
Graphics Card ATI : XFX 5870
Sound Card Realtek HD Audio 7-1
Monitor(s) Displays 1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution 1920x1080P & 1920x1200
Keyboard Microsoft 500
Mouse Razer Diamondback 3G
PSU Corsair 620HX
Case Cooler Master RC-690
Cooling Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Hard Drives 1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
Internet Speed 14 Mb/s
Other Info 1x Koutech 3Gb/s SATA HDD Hot Swap Rack
|
05 Mar 2010
|
#4
|
|
|
Hello Ted,
Ok. I added step 1D to help others avoid this. Thank you for finding this.
|
My System Specs |
|
Computer type PC/Desktop
System Manufacturer/Model Number Self built custom
OS 64-bit Windows 10 Pro
CPU Intel i7-3930K 3.2 Ghz (O/C 4 Ghz)
Motherboard ASRock X79 Extreme11
Memory 32 GB (4x8GB) G.SKILL DDR3 Quad PC3-19200 2400MHz
Graphics Card MSI N760 TF 4GB5/OC GTX 760 4GB
Sound Card SB Recon 3Di Integrated Chip
Monitor(s) Displays 3 x 27" Asus VE278Q
Screen Resolution 1920x1080
Keyboard Logitech wireless K800
Mouse Logitech MX Master
PSU OCZ Series Gold OCZZ1000M 1000W
Case Corsair Air 740
Cooling Corsair Hydro H115i
Hard Drives 256GB OCZ Vector
6TB WD Black WD6001FZWX
Internet Speed 300 Mb/s Download and 30 Mb/s Upload
Antivirus Malwarebyte Anti-Malware Premium
Browser IE11
Other Info Creative F200 webcam
* Lite-On iHBS212 12x BD Writer
* Samsung CLX-3175FW Printer
* Linksys EA9500 Router
* Arris SB6190 Cable Modem
* APC SMART-UPS RT 1000 XL
|
06 Mar 2010
|
#5
|
|
|
You're welcome Shawn, thank you for all the hard work you put in around here making it easy for the rest of us.
|
My System Specs |
|
System Manufacturer/Model Number * BFK Customs *
OS W 7 64-bit Ultimate
CPU Intel Q9550 Yorkfield
Motherboard ASUS P5Q Pro
Memory 8GB Dominator 8500C5D
Graphics Card ATI : XFX 5870
Sound Card Realtek HD Audio 7-1
Monitor(s) Displays 1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution 1920x1080P & 1920x1200
Keyboard Microsoft 500
Mouse Razer Diamondback 3G
PSU Corsair 620HX
Case Cooler Master RC-690
Cooling Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Hard Drives 1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
Internet Speed 14 Mb/s
Other Info 1x Koutech 3Gb/s SATA HDD Hot Swap Rack
|
26 Oct 2010
|
#6
|
|
|
Thanks a lot for this great post.
|
My System Specs |
|
OS Windows 7 Ultimate 32bit
CPU AMD Phenom II x4 965 3.4GHz
Motherboard Gigabyte GA-890FXA-UD5 rev2.0
Memory G.SKILL F3-16000CL8D-4GBPIS (2GBx2)
Graphics Card Inno3d GTX480 1.5GB GDDR5
Monitor(s) Displays LG FLATRON W2486L
Screen Resolution 1920x1080@60Hz
PSU Enermax MODU82+ 625W
Case Thermaltake Element G Middle Tower
Hard Drives Western Digital Caviar Black WD1002FAEX 1TB 64MB 7200RPM Sata III x3
|
26 Oct 2010
|
#7
|
|
|
You're most welcome Need4steer, and welcome to Seven Forums.
|
My System Specs |
|
Computer type PC/Desktop
System Manufacturer/Model Number Self built custom
OS 64-bit Windows 10 Pro
CPU Intel i7-3930K 3.2 Ghz (O/C 4 Ghz)
Motherboard ASRock X79 Extreme11
Memory 32 GB (4x8GB) G.SKILL DDR3 Quad PC3-19200 2400MHz
Graphics Card MSI N760 TF 4GB5/OC GTX 760 4GB
Sound Card SB Recon 3Di Integrated Chip
Monitor(s) Displays 3 x 27" Asus VE278Q
Screen Resolution 1920x1080
Keyboard Logitech wireless K800
Mouse Logitech MX Master
PSU OCZ Series Gold OCZZ1000M 1000W
Case Corsair Air 740
Cooling Corsair Hydro H115i
Hard Drives 256GB OCZ Vector
6TB WD Black WD6001FZWX
Internet Speed 300 Mb/s Download and 30 Mb/s Upload
Antivirus Malwarebyte Anti-Malware Premium
Browser IE11
Other Info Creative F200 webcam
* Lite-On iHBS212 12x BD Writer
* Samsung CLX-3175FW Printer
* Linksys EA9500 Router
* Arris SB6190 Cable Modem
* APC SMART-UPS RT 1000 XL
|
07 Nov 2010
|
#8
|
|
|
Thanks
Thanks
but unfortunately it doesn't work with me i will give up maintaining my flash drive
|
My System Specs |
|
|
07 Nov 2010
|
#9
|
|
|
Hello Zezoclo, and welcome to Seven Forums.
Could you give us more details on what part did not work for you, and include any error messages or screenshots? We may be able to help to get it to work for you.
|
My System Specs |
|
Computer type PC/Desktop
System Manufacturer/Model Number Self built custom
OS 64-bit Windows 10 Pro
CPU Intel i7-3930K 3.2 Ghz (O/C 4 Ghz)
Motherboard ASRock X79 Extreme11
Memory 32 GB (4x8GB) G.SKILL DDR3 Quad PC3-19200 2400MHz
Graphics Card MSI N760 TF 4GB5/OC GTX 760 4GB
Sound Card SB Recon 3Di Integrated Chip
Monitor(s) Displays 3 x 27" Asus VE278Q
Screen Resolution 1920x1080
Keyboard Logitech wireless K800
Mouse Logitech MX Master
PSU OCZ Series Gold OCZZ1000M 1000W
Case Corsair Air 740
Cooling Corsair Hydro H115i
Hard Drives 256GB OCZ Vector
6TB WD Black WD6001FZWX
Internet Speed 300 Mb/s Download and 30 Mb/s Upload
Antivirus Malwarebyte Anti-Malware Premium
Browser IE11
Other Info Creative F200 webcam
* Lite-On iHBS212 12x BD Writer
* Samsung CLX-3175FW Printer
* Linksys EA9500 Router
* Arris SB6190 Cable Modem
* APC SMART-UPS RT 1000 XL
|
|