blkdiscard
Discards device sectors on storage devices. Useful for SSDs. More information: https://manned.org/blkdiscard.
-
Discard all sectors on a device, removing all data:
blkdiscard /dev/{{device}}
-
Securely discard all blocks on a device, removing all data:
blkdiscard --secure /dev/{{device}}
-
Discard the first 100 MB of a device:
blkdiscard --length {{100MB}} /dev/{{device}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.