-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux shred Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to shred on Linux, covering Arch Linux, CachyOS, and other distributions including secure file deletion, data overwriting, and privacy protection.
shred securely deletes files by overwriting.
Uses:
- Secure deletion: Overwrite before delete
- Privacy protection: Prevent data recovery
- Data destruction: Destroy sensitive data
- Multiple passes: Overwrite multiple times
Warning: Use with caution! Data cannot be recovered after shredding.
Basic usage:
# Shred file
shred file.txt
# Overwrites and deletes fileDon't delete:
# Overwrite only (don't delete)
shred file.txt
# Overwrites but keeps fileDelete after overwrite:
# Shred and remove
shred -u file.txt
# -u = unlink (removes after shredding)Show progress:
# Verbose
shred -v file.txt
# -v = verbose (shows progress)Number of passes:
# Multiple passes
shred -n 5 file.txt
# -n = iterations (5 passes)Random overwrite:
# Random data
shred -z file.txt
# -z = zero (final pass with zeros)Check installation:
# shred is part of coreutils
# Usually pre-installed
# Check shred
which shredThis guide covered shred usage, secure file deletion, and data overwriting for Arch Linux, CachyOS, and other distributions.
- rm Guide - File deletion
- Security Configuration - Security setup
-
shred Documentation:
man shred
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.