Windows 7 Forums


Windows 7: Disk - Clean and Clean All with Diskpart Command

03 Jan 2010  
Brink

 
Disk - Clean and Clean All with Diskpart Command

How to "Clean" or "Clean All" a Disk with the Diskpart Command

...


Last edited by Brink; 7 Hours Ago at 11:38 AM..
My System SpecsSystem Spec

20 Mar 2012  
Brink

 

Quote   Quote: Originally Posted by mjf View Post
It may have been mentioned earlier but you can run the tutorial from the command prompt of a system repair disk if you can't or don't want to boot into the OS.
Oh no, I posted the above so he would know that "clean" will wipe the entire HDD so he wouldn't wipe his OS partition by mistake thinking "clean" would only wipe selected drive letters on HDD.

Last edited by Brink; 20 Mar 2012 at 10:41 PM.. Reason: added quote
My System SpecsSystem Spec

20 Mar 2012  
ICit2lol

 

Quote   Quote: Originally Posted by Brink View Post
Hello John,

Unless the OS is on a separate physical HDD than the one you wanted to use "clean" or "clean all" on, then no. They will wipe everything on a HDD including all partitions/volumes.
Thanks Shawn thought that might be the case so will just use the drive for clean installs

Pity there wasn't a way of "saving" the OS before doing the clean, as most of the stuff I get to tidy up for folks does not have an installation disk.

My System SpecsSystem Spec
21 Mar 2012  
bpelowski

 

Quote:
A) In the elevated command prompt, type clean all and press Enter. 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.
Question - shouldn't my hard drive light be doing a lot of blinking after typing clean all? I followed the steps and typed clean all but now I just have a blinking cursor under the line DISPART> clean all.
My System SpecsSystem Spec
21 Mar 2012  
Brink

 

Hello bpelowski,

Yep, it would be normal for there to be quite a bit of HDD activity for that drive as it's being secured erased by having 0 written over all of it sectors. It'll take a while for it to finish and until you see the "Diskpart succeeded...." message in the command prompt.
My System SpecsSystem Spec
.


21 Mar 2012  
mjf

 

Quote   Quote: Originally Posted by Brink View Post
Quote   Quote: Originally Posted by mjf View Post
It may have been mentioned earlier but you can run the tutorial from the command prompt of a system repair disk if you can't or don't want to boot into the OS.
Oh no, I posted the above so he would know that "clean" will wipe the entire HDD so he wouldn't wipe his OS partition by mistake thinking "clean" would only wipe selected drive letters on HDD.
Ok I just meant that understanding what "clean" , "clean all" does to the "selected disk", you can use the system repair disk to perform the function.
Sorry if it confused your advice to the OP.
My System SpecsSystem Spec
21 Mar 2012  
Brink

 

No problemo mate.
My System SpecsSystem Spec
20 Apr 2012  
dMuse

 
Windows 7 DISKPART> clean all

[This is my first post here, just registered]

I have executed this 3 times already. It's hard to determine if anything is happening. There is no message, just a blinking cursor. Is the process going on or not? Is there a way to tell? The HD is a 640GB Samsung HM640jj. I ran "clean" and it terminated almost immediately and it said successfully, but I don't know a lot about this stuff. I'm doing all this because I inadvisedly let a party run some code on my computer with logmein123, and now I'm paying the price, spending my day (and on into tomorrow, etc.) reinstalling everything.

I could run DBAN, but if "clean all" terminates successfully, I obviously won't have to. The concern, for the most part, seems to be that there was a rootkit placed on the system, and I want to be sure that going forward my computer will be secure.

Is it normal for DISKPART> clean all to be followed by a blinking cursor for hours, no indication of progress, nothing??? Thanks for help.
My System SpecsSystem Spec
20 Apr 2012  
dMuse

 

Quote   Quote: Originally Posted by bpelowski View Post
Quote:
A) In the elevated command prompt, type clean all and press Enter. 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.
Question - shouldn't my hard drive light be doing a lot of blinking after typing clean all? I followed the steps and typed clean all but now I just have a blinking cursor under the line DISPART> clean all.
Ah, I guess that kind of answers my question. It may be 3 hours or more before I see a "succeeded" message. Well, I think I will do some other stuff while this is going on...

It's a hard for me to tell about notifications here. It says I'm subscribed to this thread, but how do I ensure that I will get an instant email notification? I'm not a noob to forums, but the mechanics of this one has me confused. I confess, I'm easily confused... at times.
My System SpecsSystem Spec
20 Apr 2012  
Brink

 

Hello dMuse, and welcome to Seven Forums.

Yep, unless you wanted to include a secure erase, then using the clean instead of clean all command would have been finished within a few moments. Eventually you'll get a completed message in the command prompt letting you know it's finished. It can take a while to finish depending on how the size of the HDD.

You should get an instant email notifcation about my reply post, and any other reply to this thread other than yours for as long as you are subscribed to it.

Hope this helps,
Shawn
My System SpecsSystem Spec
22 Apr 2012  
dMuse

 

Quote   Quote: Originally Posted by Brink View Post
Hello dMuse, and welcome to Seven Forums.

Yep, unless you wanted to include a secure erase, then using the clean instead of clean all command would have been finished within a few moments. Eventually you'll get a completed message in the command prompt letting you know it's finished. It can take a while to finish depending on how the size of the HDD.

You should get an instant email notifcation about my reply post, and any other reply to this thread other than yours for as long as you are subscribed to it.

Hope this helps,
Shawn
What is a "secure erase?" Is that part of the DISKPART command? I certainly wanted to ensure that no malware etc. remains on the HD. Did a "clean all" not ensure that? Yes, I got an instant email notification when you posted, thank you. My Clean All did execute successfully after 2-3 hours.
My System SpecsSystem Spec
Comment

 Disk - Clean and Clean All with Diskpart Command problems?



Tutorial Tools



Similar help and support threads for: Disk - Clean and Clean All with Diskpart Command
Windows 7 Tutorial Category
Can "diskpart clean all" be performed after a "diskpart clean" ? Hardware & Devices
Solved Diskpart hangs running 'clean all' Installation & Setup
DISKPART & HDD help - Clean All interrupted, disk no longer found. General Discussion
Do not see HDD after clean all using diskpart General Discussion
Solved Diskpart Clean All Error General Discussion


All times are GMT -5. The time now is 06:42 PM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd