Skip to main content

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, /etc are 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 curses support

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

Metadata

Release files for sdelete 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sdelete 0.1.2
File Size Uploaded
sdelete-0.1.2.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sdelete 0.1.2
File Interpreter ABI Platform
sdelete-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / sdelete-0.1.2.tar.gz

Download URL sdelete-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
59028979d5b6b23b9b5886ffb347efcf3977908d60ce203caeed38e2c3841c6a
BLAKE2b-256 checksum
How to use checksums
622fb9c921e2a11a04a1e2421d49704ab73d12096a63f7c67a82a39acdc8b131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / sdelete-0.1.2-py3-none-any.whl

Download URL sdelete-0.1.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52589c9fc208b799bdefec8cb539b9f17f4a4500765ae4a39f8b14bc6d8c27e9
BLAKE2b-256 checksum
How to use checksums
d165883f6cb11067e7ebf2af059973e7a9f639395a338b3586924fe987fcab4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page