2019-10-03 21:37:08 +01:00
|
|
|
# blkdiscard
|
|
|
|
|
|
|
|
> Discards device sectors on storage devices. Useful for SSDs.
|
2021-07-09 15:45:55 +01:00
|
|
|
> More information: <https://manned.org/blkdiscard>.
|
2019-10-03 21:37:08 +01:00
|
|
|
|
|
|
|
- Discard all sectors on a device, removing all data:
|
|
|
|
|
2024-06-11 05:47:57 +01:00
|
|
|
`blkdiscard {{/dev/device}}`
|
2019-10-03 21:37:08 +01:00
|
|
|
|
|
|
|
- Securely discard all blocks on a device, removing all data:
|
|
|
|
|
2024-06-11 05:47:57 +01:00
|
|
|
`blkdiscard --secure {{/dev/device}}`
|
2019-10-03 21:37:08 +01:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Discard the first 100 MB of a device:
|
2019-10-03 21:37:08 +01:00
|
|
|
|
2024-06-11 05:47:57 +01:00
|
|
|
`blkdiscard --length {{100MB}} {{/dev/device}}`
|