Skip to content

Command Reference

Lucas edited this page Mar 7, 2026 · 9 revisions

Command Reference

Primary Flags

  • --host HOST Selects the GitHub host, for example github.com.
  • --account USER Selects the authenticated GitHub account to use on the selected host.
  • --repo OWNER/REPO Targets a repository by owner and repository name.
  • --repo HOST/OWNER/REPO Targets a repository with an explicit host.
  • --repo https://HOST/OWNER/REPO Targets a repository by pasting the full GitHub repo URL.
  • --disable-workflows Disables all workflows in the target repository.
  • --delete-runs Deletes workflow runs in the target repository.
  • --run TARGET Deletes one specific workflow run by numeric ID or GitHub run URL.
  • --run-filter TEXT Deletes only workflow runs whose name, title, or path contains TEXT.
  • --delete-artifacts Deletes Actions artifacts in the target repository.
  • --delete-caches Deletes Actions caches in the target repository.
  • --all Runs the full cleanup flow.
  • --yes Skips the final confirmation prompt.
  • --dry-run Shows intended actions without deleting anything.
  • --no-color Disables colored terminal output.
  • --version Prints the current CLI version.

Common Examples

Interactive mode:

gh-actions-cleanup

One-line install:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/WayneTechLab/GH-Workflow-Clean/main/install.sh)"

Native GUI app:

  • open GH Workflow Clean.app
  • use the lower status bar for Refresh, Login, Logout, and direct Settings access
  • configure host and account on the Settings page
  • configure repo/URL targets and cleanup actions in Control Center
  • run the same bundled CLI engine from the GUI

Full cleanup:

gh-actions-cleanup --repo OWNER/REPO --all --yes

Target a specific host and account:

gh-actions-cleanup --host github.com --account USERNAME --repo OWNER/REPO --all --yes

Dry run:

gh-actions-cleanup --repo OWNER/REPO --all --dry-run --yes

Custom host or full repo URL:

gh-actions-cleanup --host github.example.com --repo OWNER/REPO --all --yes
gh-actions-cleanup --repo https://github.example.com/OWNER/REPO --all --yes
gh-actions-cleanup --repo github.example.com/OWNER/REPO --all --yes

Runs only:

gh-actions-cleanup --repo OWNER/REPO --delete-runs --yes

One exact run:

gh-actions-cleanup --repo OWNER/REPO --run 21023858697 --yes
gh-actions-cleanup --repo OWNER/REPO --run "https://github.com/OWNER/REPO/actions/runs/21023858697/workflow" --yes

Runs only for one workflow series:

gh-actions-cleanup --repo OWNER/REPO --delete-runs --run-filter "Sync Google Analytics Data" --yes

Artifacts only:

gh-actions-cleanup --repo OWNER/REPO --delete-artifacts --yes

Caches only:

gh-actions-cleanup --repo OWNER/REPO --delete-caches --yes

Clone this wiki locally