Project description

GarbageTruck

Features

Use GarbageTruck to build and maintain scheduled cleanup of files in various directories that tend
to collect files over time. GarbageTruck will send any files older than a relative period to the
local file system trash using the current user’s crontab to schedule checks for old files from
cron. This makes the utility safe in that any files moved to the trash could be restored simply
without worrying about immediate loss (until the trash is emptied, of course).

For example, let’s say one never cleans out their downloaded files. Here’s how to set a
GarbageTruck job to periodically move files older than six months into the trash:

$ garbagetruck set --older-than '6 months' --check-every day 'Clean out old downloads' ~/Downloads/

This will set up a schedule (using cron) to look for files each day that are older than three
montsh and have them moved into the correct trash (courtesy of send2trash). The details can be
shown like this: