Create an automation rule that will remove the attachments of all issues that were resolved 30 days ago.
Create a new rule and name it appropriately.
Providing a description will help you to identify what the rule does but this step is optional.
Select Scheduled trigger
Schedule the trigger once a day.
Run the automation at 3:00 am as it is preferable to make this operation outside of business hours.
Select JQL selector
Use the following Expression:
status WAS closed BEFORE -30d
Boolean condition
Use the following expression:
%{selector.issue.attachment} != null
Update field action