locked
how can i clean my hard drive with cmd prompt RRS feed

  • Question

  • how can i clean my hard drive with cmd prompt
    Thursday, January 22, 2015 7:16 PM

All replies

  • What do you mean with cleaning?

    The following assumes, that you use the disk as secondary drive in an existing OS environment.

    The easy way would be to delete the volumes in Disk Management console or with diskpart command, clean subcommand. But this does not preserve them from being restored. If you wish to overwrite the entire disk in a way, that restoring data is nearly to impossible, you can also use diskpart, but with clean all subcommand.

    For a secondary disk you can go the following way (assuming a drive is still there, in example E:):

    From an administrative command prompt enter following commands:

    diskpart
    select volume E:
    clean all

    This will wipe ALL volumes on the physical disk containing volume E: and overwrite each block on the drive. Depending from the disk size this may take some hours.

    If the disk has no drive letter any more, you could also go the way of

    diskpart
    list disk
    select disk x (x is here the number of the disk you wish to delete/clean)
    clean all

    Attention! If you have selected the wrong disk or volume to use this command on, once it started, only a recent backup will help to get data back. (Speaking from recent own experience ...) There is no "Are you sure" or such (and usually you are sure anyway, before its to late).

    Also - if this disk is not one from a WHS, your question is off topic here.

    Best greetings from Germany
    Olaf

    Monday, February 2, 2015 3:20 PM
    Moderator