How To - Zero Out (Wipe) a Disk

In this tutorial, I will show you how to write all zeros or ones to a disk, completing wiping the data off of the drive. This is a recommended step to secure your data when you are disposing, selling, donating, or recycling a computer.


When wiping data from disks, it's important to pay atention to avoid making accidents and causing serious headaches. Take a moment to verify commands before pressing enter and use good judgement when running these commands.


  • Writing all zeros to a disk is slow. Please consider that the operation may take several hours to complete.

Operating System Instructions


  1. Open an elevated command prompt.
  2. run diskpart
  3. Find your disk with list disk
  4. Select the disk with select disk x where x is the number of the drive you wish to wipe.
  5. run clean all
  6. Wait patently as Windows does not provide a status indicator.



  1. Open terminal
  2. run diskutil list and make note of the /dev/diskX number you wish to wipe
  3. run diskutil zerodisk /dev/diskX where X is the number gathered from the previous step



  1. Open terminal
  2. run lsblk to list disks
  3. run pv < /dev/zero > /dev/<diskID> where diskID is the disk from the previous command.