gitlab-org--gitlab-foss/scripts/clean-old-cached-assets
Rémy Coutable 66b4c6564a
Clean up assets that are older than 4 days to reduce assets cache size
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-05-14 21:34:06 +02:00

6 lines
250 B
Bash
Executable file

#!/bin/bash
# Clean up cached files that are older than 4 days
find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \;
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"