- After upgrading Pipeline Multibranch and/or Branch API plugin, Jenkins is reporting disk space issues
- After upgrading Pipeline Multibranch and/or Branch API plugin, the
$JENKINS_HOME/workspacegrows abnormally in size
The release of JENKINS-34564 introduced a new naming convention and a new directory structure for workspaces of branch jobs. The following schema illustrates the change of structure:
The outcome of this is that after the upgrade to Branch API 1.11+ Jenkins progressively creates workspaces with the new naming scheme but does not cleanup the old ones. The
$JENKINS_HOME/workspace directory grows and ultimately doubles in size.
The solution is to cleanup the
$JENKINS_HOME/workspace directory from the old workspaces. The recommended approach is the following:
- Exit Jenkins safely with
- Once Jenkins is stopped, remove the content of
- Start Jenkins
Note: Jenkins design presumes the workspace can be deleted at any moment and therefore this operation is generally safe.
There are 2 issues documented to improve this behavior: