gh-prune 🧹
__
/ |
______ $$ |____ ______ ______ __ __ _______ ______
/ \ $$ \ ______ / \ / \ / | / |/ \ / \
/$$$$$$ |$$$$$$$ |/ |/$$$$$$ |/$$$$$$ |$$ | $$ |$$$$$$$ |/$$$$$$ |
$$ | $$ |$$ | $$ |$$$$$$/ $$ | $$ |$$ | $$/ $$ | $$ |$$ | $$ |$$ $$ |
$$ \__$$ |$$ | $$ | $$ |__$$ |$$ | $$ \__$$ |$$ | $$ |$$$$$$$$/
$$ $$ |$$ | $$ | $$ $$/ $$ | $$ $$/ $$ | $$ |$$ |
$$$$$$$ |$$/ $$/ $$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$$/
/ \__$$ | $$ |
$$ $$/ $$ |
$$$$$$/ $$/
Keep your GitHub Actions clean. No more ghost workflows.
The Problem
If you use GitHub Actions regularly, you’ve probably noticed something odd:
- You delete a workflow file (
.github/workflows/old-flow.yml). - But the workflow still appears in the Actions tab.
Then comes the painful part:
- Clicking through runs one by one.
- Manually deleting history.
- Realizing there’s no native bulk cleanup button.
As a DevOps engineer, this felt like unnecessary friction.
gh-prune solves this.
What is gh-prune?
gh-prune is a Python-based CLI tool built on top of the GitHub CLI. It is designed to inspect your repository, identify workflow runs, and help you bulk-delete old or unwanted history to properly clean up the Actions UI.
Key Features
- 🔍 Inspect GitHub Actions workflows.
- 📋 List workflow runs clearly.
- 🗑️ Bulk Delete old or unwanted runs.
- ✨ Clean the Actions UI of "deleted" workflows that persist in history.
Prerequisites
Because gh-prune leverages the official GitHub CLI for authentication and API interaction, you must have it installed and authenticated.
- Install GitHub CLI: Installation Guide
-
Authenticate:
gh auth login
Installation
gh-prune is available on PyPI. You can install it via pip:
pip install gh-prune
Top comments (0)