This electronic trash can is a more attractive waste container than most. My previous container had an open top, so the contents were able to dry better. That is, autotrash is a utility that allows you to purge old files that have been deleted by you and that have remained inside the recycle bin for a specified number of days that you can specify. After the established period of time, the tool will start up and delete the contents of the directory from the trash.
Latest versionReleased:
Script to automatically purge old trash
Project description
Autotrash is a small python script to automatically remove(permanently delete) trashed files. It relies on the FreeDesktop.orgTrash files for it's deletion information.
It scans the ~/.local/share/Trash/info
directory and reads the .trashinfo
files to determine their deletion date. Files older then 30 days or filesmatching a particular regular expression are then purged, including theirtrash information file.
On Fedora consider using yum install autotrash
On Ubuntu and Debian try to install it using apt-get install autotrash
.
ArchLinux has an AUR package available.
Last option is to install autotrash using pip, for example, using: pip install --user autotrash
Automatic Setup
Auto Trash Bags
run autotrash --install
to create a systemd service which runs daily with the provided arguments. For example
will run /usr/bin/autotrash -d 30
daily.
The service can be manually started with systemctl --user start autotrash
.The timer can be enabled and disabled using systemctl --user enable autotrash.timer
andsystemctl --user disable autotrash.timer
respectively.
The service is installed to ~/.config/systemd/user
so like the cron approach, root access is not required and multiple users have their own independent services.
Manual Cron Setup
To run autotrash daily using cron, add the following crontab entry:
You can also make autotrash
process all user trash directories (not just in your home directory) by adding this crontab entry:
Or more frequently, but to keep disk IO down, only when there is less then 3GB of free space:
To configure this, run 'crontab -e' and add one of these lines in theeditor, then save and close the file.
System Startup Setup
If you do not know how to work with crontab, you could add it to the startupprograms in GNOME using the menu: System -> Preferences -> Sessions
Add the program with the '+ Add' button.
This will make sure that your trash is cleaned up every time you log in.
Autotrash
Homepage: https://github.com/bneijt/autotrash
Autotrash is now in the stable repo for Fedora 20 and is going to be synced out on the mirrors also for Fedora 21.Epel7 package is still in the testing repo but should go stable within few days.
You can install the package on Fedora right now with:
The autotrash
command is created as a script, using poetry
you can run the current implementation using:
Or by using the shell:
All pull requests and master builds are tested using github actions and require black
formatting.
Release historyRelease notifications | RSS feed
0.4.2
Auto Trash Bag
0.4.1
0.4.0
0.3.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size autotrash-0.4.2-py3-none-any.whl (22.1 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size autotrash-0.4.2.tar.gz (10.4 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for autotrash-0.4.2-py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 8e6d9cca448bb146a116c2158eee7f9bea470b665f9a979d53eea627a9d5ef2d |
MD5 | 3dd900827a18d1d606d2c9889eeca0f3 |
BLAKE2-256 | 73b7b9f3c3fc2e6c84686cb2731dbe260a26684d56c7d75e2446e71e2b2b32cc |
Hashes for autotrash-0.4.2.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | f895c9e53354847234d3b4452df412370a91668546b60a19dbcb74dc31ef9225 |
MD5 | 7c8bb18e975c322c288dcbde43fa28b7 |
BLAKE2-256 | 7033ca1872d3baea73aa822d8d777a54ae30530a6f26a55f74f0b060af2fdd79 |