Make your sensitive data PERMANENTLY GONE! ππ
A military-grade file shredding tool that overwrites data multiple times using advanced algorithms, making recovery impossible even with forensic tools.
- π₯ Military-Grade Deletion - Multiple overwrite passes using DoD 5220.22-M standard
- π‘οΈ Forensic-Proof - Makes data recovery impossible even with advanced tools
- π Multiple Algorithms - Gutmann (35 passes), DoD (7 passes), Random, Zero-fill
- π― Selective Shredding - Target specific files, folders, or file types
- π Progress Tracking - Beautiful progress bars and real-time statistics
- π Verification - Confirms successful deletion with integrity checks
- πΎ Free Space Wiping - Securely wipe unallocated disk space
- π¨ Rich CLI - Colored output with detailed reporting
- β‘ High Performance - Multi-threaded processing for large files
- π Virtual Environment - Clean, isolated installation
- π§ Highly Configurable - Custom patterns, passes, and verification levels
# Clone the repository
git clone https://github.com/LinuxCTRL/secure-file-shredder.git
cd secure-file-shredder
# Install with virtual environment (recommended)
chmod +x install_venv.sh
./install_venv.sh
# Restart terminal or reload shell
source ~/.bashrc# Shred a single file (7 DoD passes)
secure-delete shred file.txt
# Shred with maximum security (35 Gutmann passes)
secure-delete shred sensitive_document.pdf --method gutmann
# Shred entire directory recursively
secure-delete shred /path/to/secret_folder --recursive
# Wipe free space on drive
secure-delete --wipe-free-space /home/user| Command | Description | Example |
|---|---|---|
secure-delete <file> |
Shred single file | secure-delete document.pdf |
--recursive |
Shred directory recursively | secure-delete folder/ --recursive |
--method <algorithm> |
Choose shredding method | secure-delete file.txt --method gutmann |
--passes <number> |
Custom number of passes | secure-delete file.txt --passes 10 |
| Command | Description | Example |
|---|---|---|
--wipe-free-space |
Wipe unallocated space | secure-delete --wipe-free-space /home |
--pattern <files> |
Shred files by pattern | secure-delete --pattern "*.tmp,*.log" |
--verify |
Verify deletion success | secure-delete file.txt --verify |
--benchmark |
Test shredding speed | secure-delete --benchmark |
| Method | Passes | Description | Use Case |
|---|---|---|---|
quick |
1 | Single random overwrite | Non-sensitive data |
dod |
7 | DoD 5220.22-M standard | Government standard |
gutmann |
35 | Gutmann algorithm | Maximum security |
random |
3 | Random data passes | General purpose |
zero |
1 | Zero-fill overwrite | Basic deletion |
# Quick deletion (1 pass)
secure-delete file.txt --method quick
# DoD standard (7 passes) - DEFAULT
secure-delete file.txt --method dod
# Maximum security (35 passes)
secure-delete file.txt --method gutmann
# Custom number of passes
secure-delete file.txt --passes 15
# Random data overwrite
secure-delete file.txt --method random --passes 5# Shred entire directory
secure-delete /path/to/directory --recursive
# Shred with confirmation prompts
secure-delete /path/to/directory --recursive --confirm
# Shred but preserve directory structure
secure-delete /path/to/directory --recursive --keep-structure
# Exclude specific file types
secure-delete /path/to/directory --recursive --exclude "*.jpg,*.png"# Shred all temporary files
secure-delete --pattern "*.tmp" --recursive /home/user
# Shred log files older than 30 days
secure-delete --pattern "*.log" --older-than 30d
# Shred specific file extensions
secure-delete --pattern "*.doc,*.pdf,*.txt" /documents
# Shred files larger than 100MB
secure-delete --pattern "*" --min-size 100MB /downloads# Wipe free space on entire drive
secure-delete --wipe-free-space /
# Wipe free space with custom passes
secure-delete --wipe-free-space /home --passes 3
# Wipe free space with progress
secure-delete --wipe-free-space /tmp --verbose
# Quick free space wipe
secure-delete --wipe-free-space /var --method quick# Verify deletion with integrity check
secure-delete file.txt --verify
# Generate detailed report
secure-delete file.txt --report --export pdf
# Benchmark shredding performance
secure-delete --benchmark --size 1GB
# Dry run (preview what will be deleted)
secure-delete /path --recursive --dry-runπ Secure File Shredder v1.0.0
π― Target: sensitive_document.pdf
π Size: 2.5 MB
π‘οΈ Method: DoD 5220.22-M (7 passes)
π Verification: Enabled
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Shredding Progress β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Pass 1/7: Random Data ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 2/7: Complement ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 3/7: Random Data ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 4/7: DoD Pattern ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 5/7: DoD Pattern ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 6/7: Random Data ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
β Pass 7/7: Verification ββββββββββββββββββββββββββββββββββββββββ 100% | 2.5MB β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
File successfully shredded and deleted!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Shredding Report β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β File: sensitive_document.pdf β
β Original Size: 2.5 MB β
β Method: DoD 5220.22-M β
β Passes Completed: 7/7 β
β Time Taken: 3.2 seconds β
β Speed: 781 KB/s β
β Verification: PASSED β
β Recovery Probability: 0.00% (Forensically Secure) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘οΈ Data is now PERMANENTLY GONE and cannot be recovered!
π Secure File Shredder - Directory Mode
π Target: /home/user/sensitive_data/
π Scanning directory...
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Files Found β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Total Files: 47 β
β Total Size: 156.7 MB β
β File Types: .pdf (15), .doc (12), .txt (8), .jpg (7), .xlsx (5) β
β Estimated Time: 2m 34s β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘οΈ Method: DoD 5220.22-M (7 passes per file)
ββββββββββββββββββββββββββββββββββββββββ 100% | 47/47 files | 156.7MB processed
β
Directory shredding completed!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Summary Report β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Files Processed: 47/47 β
β Data Destroyed: 156.7 MB β
β Total Passes: 329 (47 files Γ 7 passes) β
β Time Taken: 2m 31s β
β Average Speed: 1.04 MB/s β
β Verification: ALL PASSED β
β Security Level: MAXIMUM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¨ WARNING: All data has been PERMANENTLY DESTROYED and cannot be recovered!
π Free Space Wiping Mode
πΎ Target Drive: /home (ext4)
π Free Space: 45.2 GB
π‘οΈ Method: Random Data (3 passes)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Free Space Analysis β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Total Capacity: 500 GB β
β Used Space: 454.8 GB β
β Free Space: 45.2 GB β
β Recoverable Data: ~12.3 GB (estimated) β
β Wipe Strategy: Sequential block overwrite β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Wiping free space...
Pass 1/3: Random Pattern ββββββββββββββββββββββββββββββββββββββββ 100% | 45.2GB
Pass 2/3: Random Pattern ββββββββββββββββββββββββββββββββββββββββ 100% | 45.2GB
Pass 3/3: Zero Fill ββββββββββββββββββββββββββββββββββββββββ 100% | 45.2GB
β
Free space wiping completed!
π‘οΈ Previously deleted files are now unrecoverable!
Time taken: 18m 42s | Speed: 4.1 MB/s
- 7 passes following US Department of Defense standard
- Pass 1: Random data
- Pass 2: Complement of pass 1
- Pass 3: Random data
- Pass 4: DoD pattern (0x96)
- Pass 5: DoD pattern (0x69)
- Pass 6: Random data
- Pass 7: Verification pass
- 35 passes designed by Peter Gutmann
- Covers all magnetic encoding methods
- Includes random and specific patterns
- Designed for maximum paranoia
- Overkill for modern drives but ultra-secure
# Define custom overwrite patterns
secure-delete file.txt --custom-pattern "0xFF,0x00,random,0xAA"
# Use specific byte patterns
secure-delete file.txt --pattern-file patterns.txt
# Combine multiple methods
secure-delete file.txt --method dod --extra-passes 5Configuration is stored at ~/.config/secure-shredder/config.json:
{
"default_method": "dod",
"default_passes": 7,
"verification_enabled": true,
"progress_bar": true,
"colored_output": true,
"confirmation_prompts": true,
"performance": {
"buffer_size": "1MB",
"max_threads": 4,
"sync_after_pass": true
},
"security": {
"secure_random": true,
"clear_memory": true,
"disable_swap": false
},
"logging": {
"enabled": true,
"log_level": "INFO",
"log_path": "~/.local/share/secure-shredder/logs/"
}
}- Python 3.7+
- Virtual environment (automatically created)
- Sufficient disk space for temporary operations
- Administrative privileges (for some operations)
click>=8.0.0 # CLI interface
rich>=12.0.0 # Beautiful terminal output
cryptography>=3.4.0 # Secure random generation
psutil>=5.8.0 # System information
tqdm>=4.62.0 # Progress bars
colorama>=0.4.4 # Colored output
- Uses OS entropy sources for random data generation
- CSPRNG (Cryptographically Secure Pseudo-Random Number Generator)
- No predictable patterns in overwrite data
- Secure memory clearing after operations
- No sensitive data left in RAM
- Optional swap file disabling
- Read-back verification of overwritten data
- Checksum validation of destruction
- Forensic-level confirmation
- Multi-threaded processing for large files
- Optimized I/O operations with proper buffering
- Memory-mapped files for better performance
- Parallel directory processing
- SSD-aware operations (TRIM support)
- Single file (100MB): ~15-30 seconds (DoD method)
- Directory (1GB, 100 files): ~3-5 minutes
- Free space (10GB): ~8-15 minutes
- Performance varies by storage type and system
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run directly
python3 secure_shredder.py --helpsecure-file-shredder/
βββ secure_shredder.py # Main application
βββ algorithms/ # Shredding algorithms
β βββ dod.py # DoD 5220.22-M
β βββ gutmann.py # Gutmann 35-pass
β βββ custom.py # Custom patterns
βββ install_venv.sh # Virtual environment installer
βββ run.sh # Runner script
βββ requirements.txt # Dependencies
βββ README.md # This file
βββ LICENSE # MIT License
βββ tests/ # Test suite
βββ test_shredding.py
βββ test_algorithms.py
βββ test_verification.py
- THIS TOOL PERMANENTLY DESTROYS DATA
- DELETED FILES CANNOT BE RECOVERED
- USE WITH EXTREME CAUTION
- ALWAYS BACKUP IMPORTANT DATA FIRST
- Ensure you have permission to delete the data
- Some jurisdictions require data retention
- Corporate environments may have specific policies
- Use responsibly and legally
- SSD wear leveling may affect effectiveness
- Modern drives use internal remapping
- TRIM commands may be more effective for SSDs
- Physical destruction is ultimate security
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- DoD 5220.22-M for the deletion standard
- Peter Gutmann for the Gutmann algorithm
- Rich for beautiful terminal output
- Cryptography for secure random generation
- π Bug Reports: Open an issue
- π‘ Feature Requests: Start a discussion
- π§ Contact: your.email@example.com
β Star this repo if it helps you secure your data!
Made with β€οΈ by LinuxCTRL - Controlling the world through better developer tools! ππͺ
Part of the LinuxCTRL Developer Toolkit - Building tools that developers actually want to use.