Skip to content
Snippets Groups Projects
Verified Commit a6c56d65 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

rebuilderd_worker: clean the package cache as well

Using paccache for this which keeps up to 3 versions per package, and
also instructing it to keep any packages accessed in the past 2 weeks.
parent 9512d912
No related branches found
No related tags found
No related merge requests found
Pipeline #17386 passed
#!/bin/bash -e
# remove leftover chroots that are more than a week old
find /var/lib/repro -maxdepth 1 -name '*?_?*' -mtime +6 -exec rm -rf {} +
# clean the package cache but keep recently accessed files
flock /var/lib/rebuilderd-worker/cache.lock \
paccache -r -q -c /var/lib/rebuilderd-worker/cache --min-atime '2 weeks ago'
[Unit]
Description=Clean up stale repro chroots
Description=Clean up rebuilderd-worker chroots and cache
ConditionPathExists=/var/lib/repro
ConditionPathExists=/var/lib/rebuilderd-worker/cache
[Service]
Type=oneshot
......
[Unit]
Description=Daily repro cleanup
Description=Daily rebuilderd-worker chroot and cache cleanup
[Timer]
OnCalendar=daily
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment