Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: I messed up with DISKPART CLEAN ALL and this is how I solved it

06 Nov 2017   #1

Windows 7 x64 Pro
I messed up with DISKPART CLEAN ALL and this is how I solved it

So I bought new ssd for laptop and I "accidentally" (didn't know what I was doing) issued DISKPART CLEAN ALL so my HDD windows partitions except for the WINDOWS root were "clean", so they were not found!, I solved it with Windows built-in disk management utility (diskmgmt.msc) by reassigning the drive letter it had before, and now I have the system back, thanks be to God Almighty! (I don't care about the religion forbidden policy of the forum :) )

What I was playing with:

w7x64 pro. HDD bay 0, SSD bay 1; HDD: GPT partition table, 100 MB boot partition vfat, and a bunch of other partitions including NTFS Windows C, programs, and data partitions, and Linux Suse with grub OS loader so other ext3 partitions; SDD with nothing (irrelevant).

So, this is How I messed up:

- start windows button -> cmd-> CTRL+SHIFT+ENTER (so as to run it as Administrator)
- DISKPART-> LIST DISK -> SELECT DISK 0 -> CLEAN ALL (disk 0:hdd, disk 1:ssd... So I erred with the disk selection too)

(So that's the guide on how to mess up with your system real quick!)

After that no Users folder, and most of my programs couldn't be accessed either! (I had placed Users and programData on other partitions from install Autounattended)

What I tried first, and what I learned for DISKPART and partition recovery utilities

To begin with, not panicking! I have previously lost data down to rushing to recovering software before understanding the consequences of the actions! (once (kind of long time ago) I lost some partitions, and tried a recovery tool that made me enter some cluster size info, and since it was not the correct one I lost plenty of data! it was years of university data what I was trying to recover back then! and I couldn't recover them all! now the recovery tools are more reliable)

any way, what i did this time:

- I booted into Linux so as to access Internet
- I opened Gnome Disk utility (from KDE) and I could see my partitions, my data, I could mount the partitions and see my files! thanks be to God Almighty everything was still there!
- I tried the same from a Gparted USB (I booted into it) and the partitions were there too

so then:

- Forums, Internet, etc
- So I stumbled across several posts recommending partition wizard Mini tool so i downloaded it installed it in windows
- Windows->Administrator user -> that minitool-> recovery wizzard
- then it said it was going to recover the partitions but one partition was going to be deleted!, I did not want that! since I knew the partition was there.
- I tried placing a letter in the partition (because the tool could see the partitions already before the wizard) but it asked me to buy the paid version.

Lessons learnt:

As soon as you install your system:
- If you have a MBR partition table, back up the first kb of the HDD with the linux "dd" command (look on the internet on how to do it this is not the scope of the post) and when you really mess up with partitions restore it up with dd.
- If you have GPT partition table, backup the partition table and the EFI (again, I won't post it here because that's not the scope of this post, nor do i have the info handy right now) and restore from that everytime you really delete partitions.
- have a real backup plan, preferrably with online (continuous) and offline disks so you don't worry about data!

when you run into problems and cannot find those backups/didn't do any partitions backup and just messed with DISKPART:
- DISKPART CLEAN ALL does not delete partitions! It appears so but no!
- Don't rush recovery software it may render your actual data unreadable
- Don't rush into recovering your partition it may corrupt the index file table
- Don't buy sw you don't need, try first with free tools.

If you messed up with some real partition deletion/creation and don't have backups then:

- Don't format partitions from anywhere to resemble how they were, save your data first, try to recover your system first. only when you have succeeded in recovering your data can you think on formating.
- so that means using recovering data first and then recovering partitions later and then it'll mean to buy any of those (EaseUs, minitool, etc)

This time that I didn't do a real partition deletion:

Enter Windows Disk Management (diskmgmt.msc) to solve your DISKPART CLEAN ALL problems

- So I recovered it with: CTLR+R-> diskmgmt.msc -> I selected the partitions (for they could be seen from that utility as they could from Gnome disk utility) -> right click -> change letter -> Assign the letter It had previously for all the partitions involved -> restart

- At first boot after restauring the partitions I was presented with Administrator and “Other User” I had to type in correct name and password (for my personal user) and voila! I was in, thanks be to God! The system looks as it was previously! no data lost!, no buying anything! free.

I hope this helps some one...

My System SpecsSystem Spec
08 Nov 2017   #2

Windows 7 Home Premium 32 bit

Unbelievable and defies logic. This applies to most of your statements, methodology and end result..

To be helpful please do it again on that HDD and post the screenshots taken at each and every stage.

1. Screenshot of that HDD in Windows Disk Management before running DISKPART > clean all

How to post a proper screen capture image of your Disk Management Screen: Disk Management - Post a Screen Capture Image - Windows 7 Help Forums

Screenshots and Files - Upload and Post in Seven Forums:
Screenshots and Files - Upload and Post in Seven Forums - Windows 7 Help Forums

2. Screenshot of DISKPART > clean all performed on that HDD and completed ( as in the screenshot in para 9 of this tutorial Disk - Clean and Clean All with Diskpart Command - Windows 7 Help Forums )

3. Screenshot of Windows Disk Management showing the HDD after completion of DISKPART > clean all
( which you claim shows all partitions and you only needed to assign drive letters.)

Thanks for being helpful that way. :)


1. Please do not perform any other unspecified operation/s like viewing it in Gnome Disk utility (from KDE)/ Gparted USB etc,.( Nothing Linux anywhere in the above process)

2. I am not responsible, if after doing it as per the procedure you had outlined in your post, you are unable to recover the drive and partitions.

3. To be safe rather than be sorry, backup all important data before you do it again to post the screenshots to prove your method..

Seeing is believing. :)
My System SpecsSystem Spec

 I messed up with DISKPART CLEAN ALL and this is how I solved it

Thread Tools

Similar help and support threads
Thread Forum
Disk - Clean and Clean All with Diskpart Command
How to "Clean" or "Clean All" a Disk with the Diskpart Command 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...
Diskpart clean done accidently...Please help!!
Hello There, As I read through other diskpart clean discussions... I also have done the same and I run a scan with partition recovery wizard and it is showing my data..but I don't know how to recover it. I contacted with minitool partition recovery wizard help, They said to do a scan with...
Backup and Restore
Formating 3tb drive..diskpart clean or clean all
I am having to format a 3tb drive that I am installing Windows 7 on and I need to know do I need to do clean all or just clean in diskpart? What happened is I did not know about the GPT (first time dealing with a drive over 2tb) and I just went through the motions like you do with installing. Well...
Installation & Setup
Should I clean my HDD with Parted Magic or Diskpart clean all command?
Hi everyone i have a question about HDD Clean and also question about Win 7 64 bit :) I want to wiped out my all HDD data inside i want to delete all information like a brand new HDD. I heard that there is a program called Parted Magic can do this and also Diskpart clean all command too. ...
General Discussion
Do not see HDD after clean all using diskpart
Can someone please help with this. after do clean all follow diskpart and format HDD. now do not see this hdd in my computer but see it in DISKPART. thanks,
General Discussion

Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 14:17.
Twitter Facebook Google+