Skip to main content

drop-in replacement for rm with undo/restore built-in.

Project description

resrm

resrm is a safe, drop-in replacement for the Linux rm command with undo/restore support.
It moves files to a per-user trash instead of permanently deleting them, while still allowing full sudo support for root-owned files.


Features

  • Move files and directories to a trash folder instead of permanent deletion
  • Restore deleted files by short ID or exact basename
  • Empty trash safely
  • Supports -r, -f, -i, --perma options
  • Works with sudo for root-owned files

Installation

Install via Poetry:

poetry add resrm

Or clone the repo and install locally:

git clone https://github.com/mdaleo404/resrm.git
cd resrm
poetry install

Usage

# Move files to trash
resrm file1 file2

# Recursive remove of a directory
resrm -r mydir

# Force remove (ignore nonexistent)
resrm -f file

# Interactive remove
resrm -i file

# Permanent delete (bypass trash)
resrm --perma file

# List trash entries
resrm -l

# Restore a file by ID or basename
resrm --restore <id|name>

# Empty the trash permanently
resrm --empty

Trash Location

Normal users: ~/.local/share/resrm/files

Root user: /root/.local/share/resrm/files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resrm-0.1.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resrm-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file resrm-0.1.0.tar.gz.

File metadata

  • Download URL: resrm-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.9 Linux/6.17.7-200.fc42.x86_64

File hashes

Hashes for resrm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c1ff7bd9694fa87f012909ec2f351c579dffde23291add7b70033674c66d7702
MD5 b0f71e5ef924a74df5b67c3f90b847c4
BLAKE2b-256 582977f81142bcff21029c2cfc158935ab84268ebdbb9c0b00b4dd55b658be85

See more details on using hashes here.

File details

Details for the file resrm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: resrm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.9 Linux/6.17.7-200.fc42.x86_64

File hashes

Hashes for resrm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1805f3112a2344836056974e13bab7ecc9872175d58abf4ec259d170eddda069
MD5 97b914bb08022634d23dd9919496bfcb
BLAKE2b-256 3e2ccfab6b3a22a588e3e6f6ccb593feff531818b422532a6f4f100e22d7238c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page