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
- Open an elevated command prompt.
- Find your disk with
- Select the disk with
select disk xwhere x is the number of the drive you wish to wipe.
- Wait patently as Windows does not provide a status indicator.
diskutil listand make note of the /dev/diskX number you wish to wipe
diskutil zerodisk /dev/diskXwhere X is the number gathered from the previous step
lsblkto list disks
pv < /dev/zero > /dev/<diskID>where diskID is the disk from the previous command.