Skip to main content

Astronomer Registry Cleanup

Minimal CLI to delete old Docker image tags in Astronomer registries.

Install

pip install astronomer-registry-cleanup

Usage

astronomer-registry-cleanup -r <registry> -p <token> <release_name> -f <prefix> (--keep-n-tags N | --drop-older-tags YYYY-MM-DD) [--dry-run]

Behavior

  • Auth: -p is your systemadmin token (username is not required).
  • Tags considered: <prefix>-<number> only.
  • Safety: never deletes if ≤ 1 tag exists for the prefix.
  • Dry-run prints one line per planned deletion: <release_name>:<tag> <digest>.

Examples

# Keep the latest 3 tags for prefix "deploy-" (dry-run)
astronomer-registry-cleanup -r registry.example.com -p <token> my-release -f deploy- --keep-n-tags 3 --dry-run

# Delete everything older than a date for prefix "cli-" (dry-run)
astronomer-registry-cleanup -r registry.example.com -p <token> my-release -f cli- --drop-older-tags 2025-08-01 --dry-run

Notes

  • Works against Docker Registry v2 auth flow via Houston.

Manual Registry Garbage Collection

After cleanup, run garbage collection on the registry pod:

kubectl exec -n astronomer -ti $(kubectl -n astronomer get pods -l component=registry -o jsonpath="{.items[*].metadata.name}") -c registry -- registry garbage-collect /etc/docker/registry/config.yml

Metadata

Release files for astronomer-registry-cleanup 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astronomer-registry-cleanup 0.1.3
File Size Uploaded
astronomer_registry_cleanup-0.1.3.tar.gz 34.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for astronomer-registry-cleanup 0.1.3
File Interpreter ABI Platform
astronomer_registry_cleanup-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 40.7 kB

Release files / astronomer_registry_cleanup-0.1.3.tar.gz

Download URL astronomer_registry_cleanup-0.1.3.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ff4bf10af5d00cf5808ac93dbf3848a0a9c59cf2ef783362a9125cf4fe93e3f
BLAKE2b-256 checksum
How to use checksums
2dc08fa81ead7fdff4a6c1d2b3ee87de63ee7a6e63da9bf99b811727d6416130
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / astronomer_registry_cleanup-0.1.3-py3-none-any.whl

Download URL astronomer_registry_cleanup-0.1.3-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92d7580d9135bf8959418992a470f438819dd0d1dad4801b0b6096a665a77ae7
BLAKE2b-256 checksum
How to use checksums
7b7586ca08b29bec200cf9cc41efe405b1fd84a1d2aae63b26f6067163220aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page