Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

blkdiscard: quick discard on SSDs

Package: util-linux · Writes to disks: yes

Tells an SSD that all its blocks are free, which is very fast, but it is not a guaranteed erasure: use it to prepare a drive for reuse, not for sensitive data.

sudo blkdiscard /dev/sdX            # discard everything
sudo blkdiscard --secure /dev/sdX   # secure discard, if the drive supports it
sudo blkdiscard --zeroout /dev/sdX  # write zeros instead of discarding