# Automated Docker registry cleanup: remove old tags, run garbage collection, send email alerts
This workflow helps DevOps engineers and system administrators maintain a clean private Docker registry by automatically removing outdated image tags and freeing up disk space. The process runs on schedule and includes success/failure notifications.
## Who it´s for
- DevOps engineers managing private Docker registries
- System administrators responsible for container infrastructure
- Teams using CI/CD with automated image deployments
## What the automation does
- Periodically scans the Docker registry on a cron schedule
- Retrieves all images and their tags via Docker Registry API
- Identifies outdated tags, keeping only the latest 10 and ´latest´
- Deletes obsolete tags using HTTP DELETE requests
- Triggers garbage collection on the registry server via SSH
- Sends email notifications about deletions and errors
## What´s included
- Ready-to-use n8n workflow
- Trigger and handler logic
- Integrations with Docker Registry API, SSH, and SMTP
- Basic setup and adaptation guide
## Requirements for setup
- Access to n8n (self-hosted or cloud)
- Docker Registry access with read and delete permissions
- SSH access to the registry server for garbage collection
- SMTP server for sending email alerts
## Benefits and outcomes
- Automatic disk space reclamation
- Clean and organized image registry
- Reduced risk of manual tag management errors
- Transparent logging via email notifications
- Less time spent on routine maintenance
## 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