1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/rebuilderd_worker/files/clean-repro
Evangelos Foutras a6c56d65a9
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.
2022-04-16 03:38:08 +03:00

9 lines
331 B
Bash

#!/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'