-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -

Create an account on the HP Community to personalize your profile and ask a question
08-23-2025 08:59 AM
Hi. I've been doing more research and I've found that using a Windows installation media or recovery environment to perform the Diskpart operation and using the clean all command could wipe the C: hard drive that my operating system is on. This is what I want because I want to give my computer away and my files and other data are on this drive.
Does anyone know how well this Diskpart works to erase all data?
Solved! Go to Solution.
Accepted Solutions
08-23-2025 09:51 AM - edited 08-23-2025 09:51 AM
If you are concerned about data recovery, remove the drive and destroy it.
That would be the only way to be 100% sure the data on the drive can never be recovered.
Diskpart will erase Windows, and all the partitions on the drive but the data will always be there and someone can use sophisticated software to access the data.
It's usually good enough for most folks because the average person just wants to use the PC for personal use, not see what info they can steal from it.
Let whoever you are giving the PC to, buy a new drive for it and reinstall Windows.
08-23-2025 09:51 AM - edited 08-23-2025 09:51 AM
If you are concerned about data recovery, remove the drive and destroy it.
That would be the only way to be 100% sure the data on the drive can never be recovered.
Diskpart will erase Windows, and all the partitions on the drive but the data will always be there and someone can use sophisticated software to access the data.
It's usually good enough for most folks because the average person just wants to use the PC for personal use, not see what info they can steal from it.
Let whoever you are giving the PC to, buy a new drive for it and reinstall Windows.
08-23-2025 10:30 AM
Hi. I will be taking your advice and destroying the hard drive. I would like to use the Diskpart first, but I have a problem.
I used a Recovery Drive to get to the command prompt because I want to clean Disk 0, which is where my operating system is. I was able to get to the part after entering the 0 disk as the drive I want to clean. I then typed clean all, but nothing is happening.
Why is this? I started from a Recovery drive. Besides, when I used the option to Reset Everything and clean data the other day, a message "User Profile failed and cannot be loaded" came up, but I didn't do anything about this. The Reset option did not work at all because my name still came up.
08-23-2025 10:49 AM
Hi:
Here's how I clean disks using Diskpart:
I make a bootable W10 or W11 installation flash drive with the Microsoft media creation tool:
Boot from the installation media and when you get to the part of the script that asks, 'Where do you want to install Windows, do this:
- Press Shift+F10 from inside Windows Setup screen to open a command prompt window.
- Type diskpart and press the Enter key.
- Type list disk to find your disk number.
- Type select disk (e.g., select disk0) to choose the disk you want to format.
- Finally, type clean to wipe the disk completely.
- Exit diskpart
Remove the USB flash drive, push and hold the power button to shut down the PC, unplug it and remove the drive.
08-23-2025 11:08 AM
It takes less than a few seconds for Diskpart to run and clean the disk, and it will report that the operation was successful.
If you don't see what appears in the link I posted, then the disk was not cleaned.
OIP.Lu-4sXKGR38_oZfFIwVDOwHaEA (474×256)
08-23-2025 11:23 AM
I've had the computer for 8 years and the disk is over 900 GB. I think it will take longer. Plus, I used the clean all command, not the clean command.
I will leave it on for a couple of hours and see what happens.
08-23-2025 12:32 PM
Hi, again. A message came up "Diskpart succeeded in cleaning the disk." This was the large sized hard disk, Disk0, with over 900 GB.
Should I also clean the 14GB disk, which is Disk1? These are the only ones showing in Diskpart, besides the optical drive E.
Thanks.