{"id":20337637,"url":"https://github.com/hugoalh/disk-space-optimizer-ghaction","last_synced_at":"2025-04-11T22:42:18.306Z","repository":{"id":176477840,"uuid":"657550678","full_name":"hugoalh/disk-space-optimizer-ghaction","owner":"hugoalh","description":"A GitHub Action to optimize disk space for GitHub hosted runner.","archived":false,"fork":false,"pushed_at":"2025-04-11T09:30:19.000Z","size":208,"stargazers_count":7,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T11:44:12.660Z","etag":null,"topics":["disk","gh-action","ghaction","github-action","optimize"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugoalh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-23T10:04:12.000Z","updated_at":"2025-04-11T09:30:23.000Z","dependencies_parsed_at":"2023-12-03T04:21:28.938Z","dependency_job_id":"8a272200-4a93-43d8-88e7-3cb910ec6062","html_url":"https://github.com/hugoalh/disk-space-optimizer-ghaction","commit_stats":null,"previous_names":["hugoalh/disk-space-optimizer-ghaction"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fdisk-space-optimizer-ghaction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fdisk-space-optimizer-ghaction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fdisk-space-optimizer-ghaction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fdisk-space-optimizer-ghaction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugoalh","download_url":"https://codeload.github.com/hugoalh/disk-space-optimizer-ghaction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248398821,"owners_count":21097294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disk","gh-action","ghaction","github-action","optimize"],"created_at":"2024-11-14T21:09:40.249Z","updated_at":"2025-04-11T22:42:18.279Z","avatar_url":"https://github.com/hugoalh.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Disk Space Optimizer (GitHub Action)\n\n[**⚖️** MIT](./LICENSE.md)\n\n[![GitHub: hugoalh/disk-space-optimizer-ghaction](https://img.shields.io/github/v/release/hugoalh/disk-space-optimizer-ghaction?label=hugoalh/disk-space-optimizer-ghaction\u0026labelColor=181717\u0026logo=github\u0026logoColor=ffffff\u0026sort=semver\u0026style=flat \"GitHub: hugoalh/disk-space-optimizer-ghaction\")](https://github.com/hugoalh/disk-space-optimizer-ghaction)\n\nA GitHub Action to optimize the disk space for the GitHub hosted GitHub Actions runner.\n\nThis project is inspired from:\n\n- [Free Disk Space](https://github.com/jlumbroso/free-disk-space)\n- [Free Disk Space Action](https://github.com/ShubhamTatvamasi/free-disk-space-action)\n- [Free Up Actions](https://github.com/ThewApp/free-actions)\n- [Maximize Build Space](https://github.com/easimon/maximize-build-space)\n- [Reclaim The Bytes](https://github.com/data-intuitive/reclaim-the-bytes)\n\n\u003e [!IMPORTANT]\n\u003e - This documentation is v0.8.0 based; To view other version's documentation, please visit the [versions list](https://github.com/hugoalh/disk-space-optimizer-ghaction/tags) and select the correct version.\n\n## 🌟 Features\n\n- Always continue on error to not breaking any process.\n- Support all of the platforms.\n- Support multiple types:\n  - APT caches\n  - [APT packages][list]\n  - [Chocolatey packages][list]\n  - [Directly bundled programs][list]\n  - Docker caches\n  - Docker images\n  - Homebrew caches\n  - [Homebrew packages][list]\n  - NPM caches\n  - [NPM packages][list]\n  - OS page/swap file\n  - [Pipx packages][list]\n  - [Windows programs (WMIC)][list]\n\n## 🔰 Begin\n\n### 🎯 Targets\n\n|  | **GitHub** |\n|:--|:--|\n| **[GitHub Actions](https://docs.github.com/en/actions)** | ✔️ |\n\n\u003e [!NOTE]\n\u003e - It is possible to use this action in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.\n\n### #️⃣ Registries Identifier\n\n- **GitHub:**\n  ```\n  hugoalh/disk-space-optimizer-ghaction[@{Tag}]\n  ```\n\n\u003e [!NOTE]\n\u003e - It is recommended to use this action with tag for immutability.\n\n### 🛡️ GitHub Token Permissions\n\n*This action does not request any GitHub token permission.*\n\n## 🧩 Inputs\n\n\u003e [!NOTE]\n\u003e - All of the inputs are optional; Use this action without any input will default to do nothing.\n\n\u003e | **Legend** | **Description** |\n\u003e |:-:|:--|\n\u003e | 🔀 | Switch with groups (e.g.: `{E}`). |\n\n### `operate_async`\n\n`{Boolean = False}` Whether to operate in asynchronously, possibly reduce the operation duration.\n\n### `operate_sudo`\n\n`{Boolean = False}` Whether to execute this action in sudo mode in order to able operate protected resources on the non-Windows environment.\n\n### `general_include`\n\n`{RegEx[]}` Remove items which listed in the [list][list], by regular expression of the item name, separate each value per line.\n\n### `general_exclude`\n\n`{RegEx[]}` Exclude remove items which listed in the [list][list], by regular expression of the item name, separate each value per line.\n\n### `docker_include`\n\n`{RegEx[]}` Remove Docker images, by regular expression of the Docker image name, separate each value per line.\n\n### `docker_exclude`\n\n`{RegEx[]}` Exclude remove Docker images, by regular expression of the Docker image name, separate each value per line.\n\n### `docker_prune`\n\n`{Boolean = False}` Whether to prune Docker all of the dangling images.\n\n### `docker_clean`\n\n`{Boolean = False}` Whether to remove Docker cache, include all of the:\n\n- build caches\n- stopped/unused containers\n- dangling and/or unreferenced images\n- unused networks\n\n### `apt_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via APT. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `apt_prune`\n\n`{Boolean = False}` Whether to prune APT all of the packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.\n\n### `apt_clean`\n\n`{Boolean = False}` Whether to remove APT cache, include the local repository of retrieved package files.\n\n### `chocolatey_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via Chocolatey. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `homebrew_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via Homebrew. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `homebrew_prune`\n\n`{Boolean = False}` Whether to prune Homebrew all of the packages that were only installed as a dependency of other packages and are now no longer needed.\n\n### `homebrew_clean`\n\n`{Boolean = False}` Whether to remove Homebrew cache, include all of the:\n\n- outdated downloads\n- old versions of installed formulae\n- stale lock files\n\n### `npm_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via NPM. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `npm_prune`\n\n`{Boolean = False}` Whether to prune NPM all of the extraneous packages.\n\n### `npm_clean`\n\n`{Boolean = False}` Whether to remove NPM cache.\n\n### `pipx_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via Pipx. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `wmic_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via WMIC. Only affect items which listed in the [list][list].\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `fs_enable`\n\n**🔀{E}** `{Boolean = False}` Whether to optimize via file system.\n\nIf all of the inputs inside this switch group are `false`, this input will default to `true`.\n\n### `os_swap`\n\n`{Boolean = False}` Whether to remove system page/swap file.\n\n## 🧩 Outputs\n\n*This action does not have any output.*\n\n## ✍️ Example\n\n- ```yml\n  jobs:\n    job_id:\n      runs-on: \"ubuntu-latest\"\n      steps:\n        - name: \"Optimize Disk Space\"\n          uses: \"hugoalh/disk-space-optimizer-ghaction@v0.8.0\"\n          with:\n            operate_sudo: \"True\"\n            general_include: \".+\"\n            docker_include: \".+\"\n            docker_prune: \"True\"\n            docker_clean: \"True\"\n            apt_prune: \"True\"\n            apt_clean: \"True\"\n            homebrew_prune: \"True\"\n            homebrew_clean: \"True\"\n            npm_prune: \"True\"\n            npm_clean: \"True\"\n            os_swap: \"True\"\n  ```\n\n## 📚 Guides\n\n- GitHub Actions\n  - [Enabling debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)\n\n[list]: ./list.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh%2Fdisk-space-optimizer-ghaction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugoalh%2Fdisk-space-optimizer-ghaction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh%2Fdisk-space-optimizer-ghaction/lists"}