Introduction
When you run builds in Jenkins, they create files called artifacts. These files can take up space over time. Artifact retention policies help you keep only the important files and delete old ones automatically to save space.
When your Jenkins server is running low on disk space because of many build artifacts.
When you want to keep only the latest few builds' artifacts for quick access.
When you want to delete artifacts older than a certain number of days to keep your storage clean.
When you want to keep artifacts only for successful builds and remove those from failed builds.
When you want to automate cleanup so you donβt have to delete old files manually.