But better approach is to use shred -v /dev/sda adding whatever options you think you need to carefully erase all data. This command is part of coreutils and every single linux distribution have it out of the box.
Also, some disks have internal "secure erase" command, but I would not depend on it since nobody except manufacturer knows what that command really do.
Could be just cat /dev/random > /dev/sda
But better approach is to use shred -v /dev/sda adding whatever options you think you need to carefully erase all data. This command is part of coreutils and every single linux distribution have it out of the box.
Also, some disks have internal "secure erase" command, but I would not depend on it since nobody except manufacturer knows what that command really do.