The short version
Need to wipe an old hard drive or USB stick? Here's one approach.
Everyone ends up with old equipment, and you ask yourself, “How do I securely wipe the hard drive (HDD) or sanitize the SDD so that no one can swipe info from it?” It’s a question I’ve had to answer and take action on several times over the course of my career. While it’s easy to say, “Drill the hard drive so the data is totally unrecoverable,” that’s not always an option for some folks. Neither is taking the HDD/SDD into your backyard and putting holes the best approach.
Try ShredOS
That’s why I was pleased to see this utility that will get the job done. To capture the big picture process, I went ahead and got ChatGPT to make an infographic out of it that I could share with colleagues:
You might also find these NIST standards useful.
Where To Get ShredOS
To download ShredOS, don’t go to the website. The links there all redirect to browser-extension downloads, which are suspicious. Instead, go to GitHub links below.
IMG Download: Get ShredOS via GitHub (See instructions at the bottom of this blog entry for GNU/Linux .img write to USB stick). ISO Download: Get ShredOS ISO version (You can use a tool like Rufus to put this on a flash drive and boot up).
An Overview
| Media | What I’d use | Recommended method |
|---|---|---|
| 🖴 Traditional HDD | ShredOS / nwipe | One complete overwrite + verification |
| 🖴 Multiple old HDDs | ShredOS / nwipe | Wipe drives simultaneously; save certificates |
| 💾 USB flash drive | ShredOS / nwipe | Overwrite + verify for ordinary reuse, with caveat below |
| ⚡ SATA SSD | ATA Sanitize/Secure Erase via ShredOS tools | Prefer drive’s hardware sanitize command |
| ⚡ NVMe SSD | nvme-cli | NVMe Block Erase or Cryptographic Erase |
| 🔒 Highly sensitive flash/SSD | Sanitize command or physical destruction | Don’t rely solely on overwriting |
Instructions to Write .img File to USB Stick on Linux
1. Find the USB device
lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS
2. Unmount the USB partitions
Replace /dev/sdX with your USB device, such as /dev/sdb
sudo umount /dev/sdX*
3. Go to the folder containing the .img file
cd ~/Downloads
4. Confirm the image filename
ls -lh *.img
5. Write the image to the USB
Replace filename.img and /dev/sdX with the correct values sudo dd if=filename.img of=/dev/sdX bs=4M status=progress conv=fsync
Example:
sudo dd if=shredos-2025.11_31_x86-64_v0.42_20260716.img of=/dev/sdb bs=4M status=progress conv=fsync
6. Flush any remaining writes
sync
7. Verify the USB layout
lsblk -o NAME,SIZE,FSTYPE,LABEL,MODEL
8. Safely eject the USB
sudo eject /dev/sdX
Bonus Material
Use DD command when booting off a flash drive
Here’s another alternative to ShredOS…
1. Identify the drive
lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS
Example target:
/dev/sda
Use the WHOLE DRIVE (/dev/sda), not a partition (/dev/sda1)
2. Unmount any mounted partitions on the target drive
sudo umount /dev/sda*
3. Wipe the entire HDD with zeros
sudo dd if=/dev/zero
of=/dev/sda
bs=16M
status=progress
conv=fsync
4. Flush writes
sync
5. Confirm the drive no longer contains recognizable partitions
sudo fdisk -l /dev/sda
NVMe SSDs Process
Identify NVMe drives
sudo nvme list
Check sanitize capabilities
sudo nvme id-ctrl /dev/nvme0 | grep -i sanicap
Block erase sanitize
sudo nvme sanitize /dev/nvme0 -a 2