Automatically take out the trash

Autotrash is a simple Python script which will purge files from your trash based on their age or the amount of free space left on the device. Using autotrash -d 30 will delete files which have been in the trash for more then 30 days. It uses the FreeDesktop.org Trash Info files included in the new GNOME system to find the correct files and the dates they where deleted.

Features:

You can download the newest releases from github.

Technical overview

It's written in Python and requires the Python interpreter to run. As always, feature requests, and bug reports are very welcome at github.

See also

There is a project already packaged inside the Ubuntu archive which can achieve the same results called trash-cli. This package also promotes aliasing rm, I personally have opted to alias del with gvfs-trash.

License

All code is available under the GNU General Public License version 3+.