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:
-pis 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| astronomer_registry_cleanup-0.1.3.tar.gz | 34.2 kB | Without provenance | Details for astronomer_registry_cleanup-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| astronomer_registry_cleanup-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for astronomer_registry_cleanup-0.1.3-py3-none-any.whl |
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
|
Security for astronomer-registry-cleanup 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.