create new partition table, format then mount the partition, change dir to your device (eg: /mnt/mountpoint)! sudo dd if=/dev/zero of=nullfile
#or /dev/random
delete the file and repeat x times!
Many newer BIOS has options to safely shred devices
SSD are difficult to erase. It is not enought to overwrite sections.
info of your device
unmounted:
smartctl -a /dev/sdg