Package: pushbroom
PushbroomPushbroom is a tool designed to help keep your filesystem clear of clutter.
Certain directories, such as your downloads directory, tend to accumulate a
large amount of old files that take up space. Over time, this clutter can
accumulate to a significant amount of storage space. Pushbroom gives you an
easy way to remove these old files.Pushbroom is written in Python and should therefore work on any platform that
can run Python. For now, it is only officially supported for macOS and Linux.InstallationHomebrew (macOS only)Install via Homebrew:brew install gpanders/tap/pushbroomCopy and modify the includedpushbroom.conffile to~/.config/pushbroom/configand usebrew services start gpanders/tap/pushbroomto start the automatic launchd daemon:cp /usr/local/etc/pushbroom.conf ~/.config/pushbroom/config
brew services start gpanders/tap/pushbroomPushbroom will run once every hour.pipInstall using pip:pip install --user pushbroomYou must also copy theexample configuration fileto~/.config/pushbroom/configor create your own from scratch.From sourceCheck thereleasespage for the latest release. Download and extract the
archive, then install with pip:tar xzf pushbroom-vX.Y.Z.tar.gz
cd pushbroom-vX.Y.Z
pip install --user .
cp pushbroom.conf ~/.config/pushbroom/configUsagePushbroom can be run from the command line using:pushbroomUsepushbroom --helpto see a list of command line options.ConfigurationThe Pushbroom configuration file is organized into sections where each section
represents a directory path to monitor. The default configuration file looks
like this:[Downloads]
Path = ~/Downloads
Trash = ~/.Trash
NumDays = 30This means that, by default, Pushbroom will monitor your ~/Downloads folder and
move any file or folder older than 30 days into your ~/.Trash directory.If you don't want to move files into ~/.Trash but instead want to just delete
them, simply remove theTrashoption:[Downloads]
Path = ~/Downloads
NumDays = 30The name of the section (Downloadsin this example) is not important and can
be anything you want:[Home Directory]
Path = ~
NumDays = 90You can also specify anIgnoreparameter to instruct Pushbroom to ignore any
files or directories that match the given glob:[Downloads]
Path = ~/Downloads
NumDays = 30
Ignore = folder_to_keepSimilarly, you can specifyMatchto have Pushbroom only remove files that
match one of the given patterns:[Vim Backup Directory]
Path = ~/.cache/vim/backup
NumDays = 90
Match = *~BothIgnoreandMatchcan be a list of patterns separated by commas.[Home Directory]
Path = ~
NumDays = 365
Match = .*
Ignore = .local, .config, .cache, .vimNote that.*is nota regular expression for "match everything", but
rather aglob expressionfor "all files that start with a period".The following configuration items are recognized inpushbroom.conf:PathRequiredAbsolute path to a directory to monitor. Tildes (~) are expanded to the
user's home directory.TrashSpecify where to move files after deletion. If omitted, files will simply be
deleted.NumDaysRequiredNumber of days to keep files inPathbefore they are removed.IgnoreDefault: NoneList of glob expression patterns of files or directories to ignore.MatchDefault:*List of glob expression patterns of files or directories to remove. If omitted,
everything is removed.ShredDefault: FalseSecurely delete files before removing them. Note that this option is mutually
exclusive with theTrashoption, withTrashtaking precedence if
both options are used.RemoveEmptyDefault: TrueRemove empty subdirectories from monitored paths.AutomatingIf installed via Homebrew then Pushbroom can be set to run once every hour
usingbrew services start gpanders/tap/pushbroomAnother option is to install a crontab entry0 */1 * * * /usr/local/bin/pushbroomIf you are using a Linux distribution that uses systemd, you can copy thesystemd serviceandtimerfiles to~/.local/share/systemd/and enable
the service withsystemctl --user enable --now pushbroomNote that you may need to change the path to thepushbroomscript in the
service file depending on your method of installation.ContributingSend patchesand questions to~gpanders/pushbroom@lists.sr.ht.Report a bug or open a ticket attodo.sr.ht/~gpanders/pushbroom.Similar WorkBelvedere: An automated file manager
for WindowsHazel: Automated Organization for your Mac