Safe Remove (SRM) is a simple and efficient Linux utility designed to securely delete files. Instead of merely unlinking a file from the filesystem, SRM overwrites its contents multiple times before removal, significantly reducing the chance of data recovery.
The goal of SRM is to provide privacy, safety, and ease of use, while keeping the interface familiar to anyone who already uses rm.
- Secure file deletion by overwriting file contents multiple times
- Simple and lightweight
- Designed to behave like the standard
rmcommand - Supports the same command-line options as
rm - Ideal for users who value privacy and data safety
Installation is straightforward and requires no build process.
-
Copy the script to
/usr/local/bin:sudo cp srm /usr/local/bin/
-
Make it executable:
sudo chmod u+x /usr/local/bin/srm
After that, srm will be available system-wide like any other command.
SRM is intended to be as practical and intuitive as rm.
Basic usage:
srm file.txtYou can use it directly from the terminal with the same options you would normally use with rm.
Example:
srm -f important_file.txtThis design allows you to replace rm with srm in your workflow with minimal friction.
- Directory removal is not supported yet
The intention of the tool is to remove files, the point of directories will need to be used with shell globs like:
srm some_directory/**/*
obs: better support in the future is to be expected.
- Add secure directory removal
- Improve overwrite strategies and configurability
- Additional safety checks
While SRM significantly reduces the chances of file recovery, no software-based solution can guarantee absolute irrecoverability on all storage devices (especially SSDs with wear leveling). Use responsibly and understand your storage medium.
GPL-3