How do you avoid disk space exhaustion on Jenkins?
BeginnerProductionJenkins in Production
Answer
On the controller: buildDiscarder on every job (keep N builds, fewer artifacts), the Disk Usage or Prometheus metrics for monitoring, and externalise artifacts to Nexus/S3. On agents: cleanWs() after builds, a periodic docker system prune -af --filter "until=72h" cron, and ephemeral agents that vanish with their disks. Alert at 80% disk, since a full JENKINS_HOME can corrupt build records.
More on Jenkins in Production
How do you run Jenkins for high availability and scale?AdvancedHow do you tune the Jenkins controller JVM and avoid out-of-memory crashes?AdvancedHow do you back up and restore Jenkins?IntermediateHow do you upgrade Jenkins and its plugins safely?IntermediateHow do you harden a Jenkins controller?AdvancedHow do you configure dynamic Kubernetes agents in Jenkins for production use?Intermediate