SRM(1)
π SRM(1) β the secure remove glow-up π
okay so bestie, you're looking at SRM(1), a General Commands Manual page, and it's about to be your new fave. This is srm β secure remove, straight out of the secure_deletion toolkit. Let's get into it π
β¨ NAME β¨
srm β secure remove (secure_deletion toolkit) ποΈπ
π¦ SYNOPSIS π¦
srm [-d] [-f] [-l] [-l] [-r] [-v] [-z] files
yes the -l is in there twice, no that's not a typo, keep reading π
πΈ DESCRIPTION πΈ
srm is literally designed to delete data on mediums in a secure manner that can not be recovered by thieves, law enforcement or other threats. iconic behavior honestly. The wipe algorithm is based on the paper "Secure Deletion of Data from Magnetic and Solid-State Memory", presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers. academic king π
The secure data deletion process of srm goes like this, and no we are not skipping a single step:
- 1 pass with
0xff - 5 random passes.
/dev/urandomis used for a secure RNG if available. - 27 passes with special values defined by Peter Gutmann.
- 5 random passes.
/dev/urandomis used for a secure RNG if available. - Rename the file to a random value
- Truncate the file
not the rename and truncate at the end, it's giving "leave no trace" πβ¨
As an additional measure of security, the file is opened in O_SYNC mode and after each pass an fsync() call is done. srm writes 32k blocks for the purpose of speed, filling buffers of disk caches to force them to flush and overwriting old data which belonged to the file. it's thorough, it's committed, it's the moment π«Ά
π COMMANDLINE OPTIONS π
-dβ ignore the two special dot files.and..on the commandline. (so you can execute it like"srm -d .* *") she's got range π-fβ fast (and insecure mode): no/dev/urandom, no synchronize mode. bestie this one is literally labeled insecure, we're just saying π-lβ lessens the security. Only two passes are written: one mode with0xffand a final mode random values.-lβ-lfor a second time lessons the security even more: only one random pass is written. yes, stacking-ldoes something, that's the whole bit β¨-rβ recursive mode, deletes all subdirectories. she goes deep π¦-vβ verbose mode-zβ wipes the last write with zeros instead of random data
π LIMITATIONS π
okay so here's the reality check section, and it's important, no skipping π«Ά
NFSβ Beware of NFS. You can't ensure you really completely wiped your data from the remote disks. fr fr, the remote disks are not your business and you can't control them πRaidβ Raid Systems use stripped disks and have got large caches. It's hard to wipe them. large caches said "not today" πswap,/tmp, etc. β Some of your data might have a temporary (deleted) copy somewhere on the disk. You should usesfillwhich comes with the secure_deletion package to ensure to wipe also the free diskspace. However, If already a small file acquired a block with your precious data, no tool known to me can help you here. For a secure deletion of the swap spacesswapis available. sisters helping sisters π
π BUGS π
No bugs. There was never a bug in the secure_deletion package (in contrast to my other tools, whew, good luck ;-) LMAOO the shade Send me any that you find. Patches are nice too :) delulu is the solulu and honestly? respect π
π AUTHOR π
van Hauser / THC <vh@thc.org>
π DISTRIBUTION π
The newest version of the secure_deletion package can be obtained from http://www.thc.org
srm and the secure_deletion package is (C) 1997-2003 by van Hauser / THC (vh@thc.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; Version 2.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
β SEE ALSO β
sfill (1), sswap (1)</purple>, <cyan>sdmem (1)
and that's the whole page bestie, you ate it π
β¨ This was SRM(1) from the General Commands Manual section β that's the source and the version right there, no date on this one, and it's living in section 1 of the manual. Go forth and securely delete, you're the main character of data destruction now πππ
π¦ where this page comes from
- debian bookworm: secure-delete 3.1-8 Β· GPL-2.0-only
- debian trixie: secure-delete 3.1-12 Β· GPL-2.0-only
- ubuntu jammy: secure-delete 3.1-7 Β· GPL-2.0-only
- ubuntu noble: secure-delete 3.1-8 Β· GPL-2.0-only
- ubuntu questing: secure-delete 3.1-12
- ubuntu resolute: secure-delete 3.1-12build1 Β· GPL-2.0-only
- ubuntu stonking: secure-delete 3.1-12build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms