Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune old history files? #176

Open
neingeist opened this issue Jul 2, 2021 · 0 comments
Open

Prune old history files? #176

neingeist opened this issue Jul 2, 2021 · 0 comments

Comments

@neingeist
Copy link

neingeist commented Jul 2, 2021

My history files used up >600 MB of precious SSD space. Maybe apt-dater could have a setting to prune old history files automatically?

For now, I use this script:

#!/bin/sh
# Prune old apt-dater history
MTIME=+365

find ~/.local/share/apt-dater/history -name meta -mtime $MTIME -exec dirname {} \; | while read history_dir; do
  # We are too squeamish to just use rm -rf
  rm -f "$history_dir"/{command,meta,timingfile,typescript,failed}
  rmdir "$history_dir"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant