Shell scripts to delete old Jenkins builds
· 8 min read
Examples of shell scripts to delete old Jenkins builds based on dates, size, and excluded filters.
Requirements
A Jenkins server used by several teams frequently requires some periodic clean up. Old builds which are not used need to be deleted. Such task can easily be automated and set up to be periodically executed using crontab. This blog post explains several examples of shell scripts serving the purpose.