easimon / maximize-build-space

Github action to maximize the available disk space on Github runners
MIT License
373 stars 77 forks source link

More possible Cleanup targets #30

Open cmahnke opened 12 months ago

cmahnke commented 12 months ago

Since the Runner VMs are populated by a script, the knowledge of the contents of its configuration can help with identifying further target to remove. For example: https://github.com/actions/runner-images/blob/main/images/linux/toolsets/toolset-2204.json

How about either generating the options of this option directly from the JSON file or create some sort of rollback mechanism, than can take a similar script and just remove the software missing from the modified json file?

Cyber1000 commented 8 months ago

just my 2 cents

Thanks to everyone who works on this project. I've looked a little bit deeper today. Based on PR #20 following things to add:

Folders to remove (Klick here to open collapsed panel) ``` sudo rm -rf /opt/hostedtoolcache sudo rm -rf /usr/local/games sudo rm -rf /usr/local/sqlpackage sudo rm -rf /usr/local/.ghcup sudo rm -rf /usr/local/share/powershell sudo rm -rf /usr/local/share/edge_driver sudo rm -rf /usr/local/share/gecko_driver sudo rm -rf /usr/local/share/chromium sudo rm -rf /usr/local/share/chromedriver-linux64 sudo rm -rf /usr/local/share/vcpkg sudo rm -rf /usr/local/lib/python* sudo rm -rf /usr/local/lib/node_modules sudo rm -rf /usr/local/julia* sudo rm -rf /opt/mssql-tools sudo rm -rf /etc/skel sudo rm -rf /usr/share/vim sudo rm -rf /usr/share/postgresql sudo rm -rf /usr/share/man sudo rm -rf /usr/share/apache-maven-* sudo rm -rf /usr/share/R sudo rm -rf /usr/share/alsa sudo rm -rf /usr/share/miniconda sudo rm -rf /usr/share/grub sudo rm -rf /usr/share/gradle-* sudo rm -rf /usr/share/locale sudo rm -rf /usr/share/texinfo sudo rm -rf /usr/share/kotlinc sudo rm -rf /usr/share/swift sudo rm -rf /usr/share/doc sudo rm -rf /usr/share/az_9.3.0 sudo rm -rf /usr/share/sbt sudo rm -rf /usr/share/ri sudo rm -rf /usr/share/icons sudo rm -rf /usr/share/java sudo rm -rf /usr/share/fonts sudo rm -rf /usr/lib/google-cloud-sdk sudo rm -rf /usr/lib/jvm sudo rm -rf /usr/lib/mono sudo rm -rf /usr/lib/R sudo rm -rf /usr/lib/postgresql sudo rm -rf /usr/lib/heroku sudo rm -rf /usr/lib/gcc ```
Cyber1000 commented 8 months ago

As said that would remove nearly everything (even things like haskell, even if you say haskell:false), therefore this would need more effort to get it into a PR, don't think having enough time in the near future, but maybe someone finds the time (or can use this info)