This page looks best with JavaScript enabled

Permanently delete files on GNU/Linux

 ·  ☕ 1 min read

You can permanenty delete any data using shred utility. It overwrites the specified file(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.
In most cases I use the next options:

shred -fuz <file(s)>

If you want to see output, you can add -v option.

Here’s all options:

-f, --force
    change permissions to allow writing if necessary 
-n, --iterations=N
    overwrite N times instead of the default (3) 
--random-source=FILE
    get random bytes from FILE 
-s, --size=N
    shred this many bytes (suffixes like K, M, G accepted) 
-u, --remove
    truncate and remove file after overwriting 
-v, --verbose
    show progress 
-x, --exact
    do not round file sizes up to the next full block; 
this is the default for non-regular files
-z, --zero
    add a final overwrite with zeros to hide shredding 
--help
    display this help and exit 
--version
    output version information and exit
What's on this Page