Terminal-based secure file deletion tool with ncurses UI
Project description
sdelete
A terminal-based Python app to securely delete files and folders — with multi-select, simulation mode, overwrite-before-delete logic, and hidden file toggle. Built with ncurses for minimal UI and maximum control.
Features
- Terminal UI with scrollable file browser
- Secure deletion: overwrites files with random data before removal
- Multi-select with
SPACE - Hidden file toggle with
h - Simulation mode (dry run without deleting anything)
- Logs every action (
deleted_files.log) - Root checks for protected paths like
/,/root,/etc
Installation
Install via pip:
pip install sdelete
Or GitHub:
git clone https://github.com/bearenbey/sdelete.git
cd sdelete
pip install .
Usage
sdelete
This opens a terminal UI starting in your home directory.
Key Bindings
| Key | Action |
|---|---|
↑ / ↓ |
Navigate up and down |
ENTER |
Enter directory |
SPACE |
Select/deselect item |
d |
Delete selected (or simulate) |
h |
Toggle hidden files (dotfiles) |
q |
Quit |
When pressing d, you'll be asked whether to run in simulation mode. If you say "yes", it will preview all deletion actions without modifying any files. A scrollable log is shown.
How It Works
- Selected files are securely overwritten using three passes of random data.
- Files are deleted afterward.
- Directories are recursively deleted if empty.
- System paths like
/,/root,/etcare protected unless running as root. - All actions (real or simulated) are logged to
deleted_files.log.
When to Use It
- Cleaning up local environments (e.g.
.env, API keys, temp logs) - Securely deleting before archiving or transferring systems
- Gaining visibility before removing deeply nested files or folders
- Practicing cautious cleanup in CI, devops, or personal scripts
Requirements
- Python 3.8+
- Unix/macOS terminal with
cursessupport
Notes
This project does not use external binaries like shred or srm.
It is written in pure Python for portability and safety.
License
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, either version 3 of the License, or
(at your option) any later version.
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.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
© 2025 Eren Öğrül termapp@pm.me
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sdelete-0.1.2.tar.gz.
File metadata
- Download URL: sdelete-0.1.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59028979d5b6b23b9b5886ffb347efcf3977908d60ce203caeed38e2c3841c6a
|
|
| MD5 |
de8fc475de8966ab68904d5f9a69085c
|
|
| BLAKE2b-256 |
622fb9c921e2a11a04a1e2421d49704ab73d12096a63f7c67a82a39acdc8b131
|
File details
Details for the file sdelete-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sdelete-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52589c9fc208b799bdefec8cb539b9f17f4a4500765ae4a39f8b14bc6d8c27e9
|
|
| MD5 |
3bb2c5a2a1a98681efd981994e953357
|
|
| BLAKE2b-256 |
d165883f6cb11067e7ebf2af059973e7a9f639395a338b3586924fe987fcab4e
|