Skip to main content
PyPI PyPI - License PyPI - Python Version

rrm

Really, relentlessly and repeatedly remove files and all of their copies.

Installation

The installation is straight forward. You can install the package via pip, pipenv, poetry and alike or by downloading the source from the gitlab repository.

From gitlab.com

To get the latest features or contribute to the development, you can clone the whole project using git:

git clone https://gitlab.com/szs/rrm.git

Usage

Delete files

To delete files and add information about them to a local database, type

rrm a_file.txt "another file.log"

Find exact copies of deleted files and delete them (not implemented yet)

To search a directory for files which have been deleted (and appended to the database) by to command above, type

rrm some_directory_with_obsolete_copies

Documentation

Please (for now) refer to rrm –help for documentation:

usage: rrm [-h] [-m [DIR]] [-d DB] [-r] [-i] [-I] [-n] [-H HASH] [-l] [-V] [-q] [-v] [-D]
         PATH [PATH ...]

Really, relentlessly and repeatedly remove files and all of their copies.

positional arguments:
  PATH                  each PATH is checked whether it is a regular file or a directory. If it is
                        a regular file it will be deleted or moved to DIR (see -m option), unless
                        -n is used, and added the the database. If it is a directory, the
                        directory is scanned for matches to the files in the database (not
                        implemented yet). Note that there is a huge difference between
                        'some_directory/' and 'some_directory/*'!!

optional arguments:
  -h, --help            show this help message and exit
  -m [DIR], --move [DIR]
                        move to a directory instead of deleting the files permanently. If DIR is
                        not set (but the option is used), $HOME/.config/rrm/deleted_files/ is
                        used. The directory will be created if
  -d DB, --db-file DB   the name of the database file. If DB does not exist, it will be created,
                        otherwise rrm will append to the file. If DB is a directory, rrm will look
                        for 'DB/.rrmdb.csv' and create the file if it does not exist. If this
                        option is omitted, rrm will use (and create if inexistent)
                        $HOME/.config/rrm/rrmdb.csv (default: $HOME/.config/rrm/rrmdb.csv)
  -r, --recursive       check for files to be deleted recursively. (not implemented yet) (default:
                        False)
  -i, --interactive     gather the files to be deleted, display them and ask once to delete all of
                        them.The files are only added to the database if the deletion is confirmed
                        (default: False)
  -I, --very-interactive
                        gather the files to be deleted, display them and ask for every file before
                        deleting it.The files are only added to the database if the deletion is
                        confirmed (default: False)
  -n, --no-action       gather the files to be processed, and only add them to the database
                        without actually deleting or moving them. (default: False)
  -H HASH, --hash-algorithm HASH
                        which hash algorithm to use. Currently supported are: sha1, sha224,
                        sha256, sha384, sha512, blake2b, blake2s, md5, sha3_224, sha3_256,
                        sha3_384, sha3_512, shake_128, shake_256 (default: sha1)
  -l, --follow-symlinks
                        whether to follow symlinks (default: False)
  -V, --version         show the version of this software
  -q, --quiet           switch off text output except for error messages. This will overwrite -v.
                        (default: False)
  -v, --verbose         more verbose text output (default: False)
  -D, --debug           switch on debug mode. This will show a lot of debugging information.
                        (default: False)

TODOs

Project

  • proper documentation

  • automated tests and CI

Basic features

  • process directories (i.e., look for file that match previously deleted files

  • process files in subdirectories (option -r)

Enhancements

  • add timestamps (UNIX epoch time) to the database entries, option to delete older than x or deleted before y

  • add check for user id

  • use sqlite instead of csv files for the databases, save hashes as integers

  • maintenance of database files: Listing, splitting, merging

How to Contribute

If you find a bug, want to propose a feature or need help getting this package to work, please don’t hesitate to file an issue or write an email.

Merge requests are also much appreciated!

Metadata

Release files for rrm 0.1.1

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

Source distribution (sdist)

Source distribution for rrm 0.1.1
File Size Uploaded Provenance Actions
rrm-0.1.1.tar.gz 8.0 kB Without provenance Details for rrm-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 15.9 kB

Release files / rrm-0.1.1.tar.gz

Download URL rrm-0.1.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c5ef11c8ce1ddd8fcca801631bf2cc655464880d38205a3df43c5c1bf474aa19
BLAKE2b-256 checksum
How to use checksums
1082c8eb70e6eb82588ba1e70b9198a81e15f1fd655b53e9cc447c1483d82ae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.3 Linux/5.11.15-zen1-2-zen

Release files / rrm-0.1.1-py3-none-any.whl

Download URL rrm-0.1.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e4ab2e0b10ad9ea6765f9ce6bbbb1350d9a6c36f7e13a2265279c273f3a4bbc
BLAKE2b-256 checksum
How to use checksums
35c0f4adc8de6d0b9b162e88db00d0f5ffc991d2f8857b27cd36e4f9f28c42f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.3 Linux/5.11.15-zen1-2-zen

Security for rrm 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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