This message was deleted.
# atlantis-community
s
This message was deleted.
r
I was thinking of running this on every plan
Copy code
find /atlantis/plugin-cache -atime +100 -delete
Which should remove files if they haven't been accessed in 100 days Ref https://stackoverflow.com/a/53574389/2965993
h
there's this thing https://github.com/runatlantis/atlantis/issues/916 # [Feature] Plugin-Cache Clean Up and this one https://github.com/runatlantis/atlantis/issues/3238 # Create a new flag / environment variable for the shared provider plugin-cache directory last one has
Copy code
find '<data_dir>/plugin-cache/registry.terraform.io' -mindepth 1 -type f -not -newerat '-2 weeks' -delete
    find '<data_dir>/plugin-cache/registry.terraform.io' -mindepth 1 -type d -empty -delete
r
Oh nice, thank you! We should doc these 😁
I added a little but haven't tested it. I'll test it when i go back to work next week https://github.com/runatlantis/atlantis/issues/3238#issuecomment-1869094337
I’ve been testing the native
find
command in a
pre_workflow_hook
to remove files that haven’t been accessed in a while and it’s doing a good job with keeping the mounted volume from filling up. Please try it out to see if it helps others. https://github.com/runatlantis/atlantis/issues/3238#issuecomment-1869094337