commands.sh

blkdiscard

linux

Discards device sectors on storage devices. Useful for SSDs.

More info →

Options (2)

-s, --secureboolean

Securely discard all blocks on a device, removing all data

Example: blkdiscard {{[-s|--secure]}} {{/dev/device}}
-l, --lengthboolean

Discard the first 100 MB of a device

Example: blkdiscard {{[-l|--length]}} {{100MB}} {{/dev/device}}

Examples (3)

Discard all sectors on a device, removing all data

blkdiscard /dev/device

Securely discard all blocks on a device, removing all data

blkdiscard [-s|--secure] /dev/device

Discard the first 100 MB of a device

blkdiscard [-l|--length] 100MB /dev/device
made by @shridhargupta | data from tldr-pages