### JOHLEM.net ### --- CHEATSHEET WIPE DISK #List existing partitions, mount points and disk capacity. sudo lsblk #Wipe Storage Device with DD sudo dd if=/dev/urandom of=/dev/sdb1 bs=1M #Wipe storage device and print progress periodically. sudo dd if=/dev/urandom of=/dev/sdb1 bs=1M status=progress #Wipe Master Boot Record (MBR) dd if=/dev/zero of=/dev/hdX bs=446 count=1 #You can wipe a partition using the same method than for the whole disk. dd if=/dev/urandom of=/dev/sdX3 bs=1M == --- CHEATSHEET WIPE HD How to Wipe Hard Drive Clean Using dd Command in Linux Wipe Entire Disk = Filling the disk with all zeros: # dd if=/dev/zero of=/dev/sdX bs=1M (Filling the disk with all zeros) for security, you should populate it with random data rather than zeros: # dd if=/dev/urandom of=/dev/sdX bs=1M *replace X with the target drive letter. Wipe Master Boot Record (MBR): dd if=/dev/zero of=/dev/hdX bs=446 count=1 Wipe Partitions: # dd if=/dev/zero of=/dev/sdX2 bs=1M or # dd if=/dev/urandom of=/dev/sdX3 bs=1M (secure)