Secure Erase / Shred an External USB Hard Disk HDD in Synology NAS

First make sure you have SynoCommunity packages installed: https://synocommunity.com – SynoCli File Tools. You should also have screen or tmux installed and working, along with fdisk and shred.

SSH into your NAS and check which disk is the external USB one:

sudo fdisk -l

The disk usually shows up at the very bottom as something like this:

Be extra sure that you are working with the correct disk – I’m not responsible for any damage or data loss.

Fire up a screen or tmux session and issue a command to start the secure erase – based on the above example, it could be:

sudo shred -v -n1 /dev/usb1

More on how to use shred here: https://www.freecodecamp.org/news/securely-erasing-a-disk-and-file-using-linux-command-shred/


Thanks for reading! Please consider Buying me a Coffee or checking out Colibri!