Sunday 1 February 2015

Disk - Clean and Clean All with 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.
ORYou 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.

1. In Windows 7, open an elevated command prompt (Administrator Mode), or a command prompt at boot.
OR
2. In Windows 8 and 8.1, open an elevated command prompt (Administrator Mode), or a command prompt at boot.
Check Disk Name
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.
NOTE: For example, I would use Disk 1 if I wanted to use clean or clean all on my USB key drive.

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

3. In the elevated command prompt, type diskpart and press Enter.

4. In the elevated command prompt, type list disk and press Enter.
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.
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.
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.

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,
 
Simple Command Direct Execute:
Run CMD on Administrator Mode
  1. diskpart
  2. list disk
  3. select disk 1
  4. clean
  5. clean all

For Expert User Only !

If Show Drive Format
Then Go to Disk Management and locket your Disk Part and Right click
Then Choose New Volume (New Drive Later)
 

3 comments:

  1. Dear sir,
    i have external hard disk of WD Element in 1TB but now this have'nt detect in any window computer and in this hard disk have been very important data , so please help me sir

    ReplyDelete
  2. He is a professional hacker, he is absolutely reliable and I strongly recommend him for any types of hacking jobs you require. why i said this is because I have engaged him severally in various hacking jobs and he has never disappointed me nor any of my friends who have hired him also, He has really proven himself to be a professional and a reliable hacker, He can help you out with any hacking jobs including this:

    -Cell Phones hacking (remotely)
    -Credit Repair
    -Bitcoin Recovery (Any type of Cryptocurrencies)
    -Make money from Home (Any Countries)
    -Social media Hacking
    -Website Hacking
    -Erasing of criminal Records (Any Countries)
    -Grade Change

    Email him via: hackingsetting50@gmail.com

    ReplyDelete

Site search

    Submit URL