Scrub all local disks
I was writing a script to scrub a server prior to decommissioning, something simple that would just make the disks unusbale enough that someone couldnt boot the OS or easily read the data. This is by no stretch a comprehensive disk wipe, if someone is lookign to recover data from these disks what were are doing here is a minor inconvenience at best, this script shouldnt be relied on for secure data erasure.
Here is the complete script, running it will erase all disks including the OS, any attached USB drives.. anything!
THIS WILL DESTROY YOUR WHOLE SERVER!!
1#Must be run as root 2apt install scrub wipefs screen -y 3shutdown -P 20 4lsblk -d | cut -f 1 -d" " | tail -n +2 | grep -v loop | xargs -I % sudo screen -dmS % bash -c 'wipefs -a /dev/% || scrub /dev/% -f -p fillff'