When Addigy deploys software to devices, the installation files are stored locally in /Library/Addigy/ansible/packages. Over time, these files can accumulate and consume significant disk space. You can use a Maintenance item to automatically clear this folder on a recurring schedule.
How to Set Up Automated Cleanup
- Navigate to Catalog > Maintenance and click New.
- In the dialog that appears, fill in the following fields:
-
Name — give the item a descriptive name (e.g.,
Clear ansible/packages Folder). - Custom Script — paste the script below.
- Frequency — set to Daily, Weekly, or Monthly depending on your needs.
-
Name — give the item a descriptive name (e.g.,
- Click Save.
- Assign the Maintenance item to one or more policies by clicking the ... menu in the Actions column and selecting Assignments.
The Maintenance item will run automatically at its next scheduled time after the policy is deployed.
Script
/Library/Addigy/lan-cache find-cache /Library/Addigy/ansible/packages | xargs rm -rf
Note: This is the recommended method for freeing disk space from cached software files. After the Maintenance item runs, it may take up to 4 hours for LANCache to reflect the change and fully release the disk space.