Skip to main content

A command-line tool for managing Docker registry cleanup operations in Astronomer environments

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astronomer_registry_cleanup-0.1.3.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astronomer_registry_cleanup-0.1.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file astronomer_registry_cleanup-0.1.3.tar.gz.

File metadata

File hashes

Hashes for astronomer_registry_cleanup-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7ff4bf10af5d00cf5808ac93dbf3848a0a9c59cf2ef783362a9125cf4fe93e3f
MD5 c259b4bb80fd8bba0b6a3b1199cb6d5c
BLAKE2b-256 2dc08fa81ead7fdff4a6c1d2b3ee87de63ee7a6e63da9bf99b811727d6416130

See more details on using hashes here.

File details

Details for the file astronomer_registry_cleanup-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for astronomer_registry_cleanup-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 92d7580d9135bf8959418992a470f438819dd0d1dad4801b0b6096a665a77ae7
MD5 1b9e1fa2face5f593b899090ec4048ef
BLAKE2b-256 7b7586ca08b29bec200cf9cc41efe405b1fd84a1d2aae63b26f6067163220aba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page