summaryrefslogtreecommitdiff
path: root/scripts/clean-old-cached-assets
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clean-old-cached-assets')
-rwxr-xr-xscripts/clean-old-cached-assets6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/clean-old-cached-assets b/scripts/clean-old-cached-assets
new file mode 100755
index 00000000000..7a3a62a477a
--- /dev/null
+++ b/scripts/clean-old-cached-assets
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Clean up cached files that are older than 1 week
+find tmp/cache/assets/sprockets/ -type f -mtime +7 -execdir rm -- "{}" \;
+
+du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"