-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up macOS cache and more #3089
Comments
Does the script require sudo? Jenkins runs as the iojs user who cannot sudo to root. |
I believe it will to delete some of the files. |
Let me check if I can rewrite the script to run without sudo. In the worst-case scenario we change some folder permissions with an Ansible script and run the script with Jenkins with the same permission level. |
I dont think we will be able to change folder permission as they are system generated and dont think we should really mess with them. |
It only took me a few minutes to install and run the script to manually fix #3166. Perhaps I could create a simple Ansible playbook to manage it? Even if it still requires manual interaction, at least we can document the process and use Ansible to manage it. 🤔 |
just noticed that |
Some other finds:
|
In the cleaner.sh we had something related to it that also include
I think is ok to clean it up regularly
Not sure, probably it is ok to clean up.
I think that we can remove the directory directly. Should we move this |
I think a PR adding it to the repo would be useful. We could also have some more eyeballs in the review to make sure we are not deleting things that we should not delete.. |
I created a draft PR #3481, feel free to add your improvements @joyeecheung 👍 |
I will close this issue as the PR #3481 was merged already. |
As commented in #2917 (comment). We need a basic bash script to clean up the mac, I created a fork from paulaime/CleanUpMac:
cleaner.sh
Logs
Here are some logs from the execution made in
test-orka-macos11-x64-1
Before the script
Preparation and Execution
After the execution
After Reboot!
Conclusions
The script seems working, as we deleted big files like
/System/Volumes/Data/System/Library/Caches/com.apple.coresymbolicationd/data
with 36G and the machine seems stable 🤖 .Not sure why, but running
df -h
without rebooting returned weird results (very similar to prior execution). In any case we will reboot the machine after manually deleting the cache files, so we can ignore this.Diff: Before vs after
Diff: Before vs after reboot
Next steps
If we are happy with this approach we can start to work on a Jenkins job that will execute this on a cron base (once per week?) 🦾
The text was updated successfully, but these errors were encountered: