# Docker registry cleanup: remove old tags, run garbage collection, and send email alerts
This workflow automates routine Docker registry maintenance: removing outdated image tags, triggering garbage collection, and sending status reports. Helps prevent disk space overuse and keeps CI/CD artifacts clean and manageable.
## Who it´s for
- DevOps engineers managing local Docker registries
- SRE teams needing automated image cleanup
- Developers using CI/CD with accumulating build artifacts
- Infrastructure administrators minimizing disk usage
## What the automation does
- Periodically checks the Docker Registry API for images and their tags
- Identifies outdated tags per image (keeps latest 10 + ´latest´)
- Sends DELETE requests to remove obsolete tags
- Triggers garbage collection via SSH to reclaim physical disk space
- Sends email notifications on operation success or failure
- Runs on a cron schedule
## What´s included
- Ready-to-use n8n workflow
- Trigger and handler logic
- Integrations with Docker Registry (HTTP API), SSH, and SMTP email
- Basic textual instructions for setup and adaptation
## Requirements for setup
- Access to Docker Registry with enabled API
- SSH access to the registry server for garbage collection
- SMTP server for sending email alerts
- Running n8n instance
## Benefits and outcomes
- Automatic disk space reclamation
- Prevention of registry bloat
- Reduced storage system load
- Operational transparency via email reports
- Time savings on manual cleanup
- Maintenance of a clean, up-to-date image set
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet