Securely Delete Linux Server

By | October 30, 2014

Shutting down and deleting a Linux server securely – overwrite disk data using:

dd if=/dev/zero of=/dev/sdXXX bs=1048576

where sdXXX is found by using


which returns something like

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda 98438788 29142068 64296324 32% /
varrun 524288 44 524244 1% /var/run
varlock 524288 4 524284 1% /var/lock
udev 524288 52 524236 1% /dev
devshm 524288 0 524288 0% /dev/shm

In this case for me my main disk partition containing my data would be /dev/xvda that I want to delete so the command to securely delete a disk (overwriting with zeroes)

dd if=/dev/zero of=/dev/xvda bs=1048576

For more information on this process, check out this great article on using dd to securely erase disks on Linux.

Related Articles: