Difference between 'Delete workspace before build starts' and 'Wipe out repository & force clone' in Jenkins? Difference between 'Delete workspace before build starts' and 'Wipe out repository & force clone' in Jenkins? jenkins jenkins

Difference between 'Delete workspace before build starts' and 'Wipe out repository & force clone' in Jenkins?


There is in general no difference between both options.

They are provided by different plugins:

  • Wipe out repository & force clone is part of the Git Plugin and only suitable as extension of the git plugin
  • Delete workspace before build starts is part of the Workspace Clean Plugin

The main differences between the Workspace Clean Plugin and the Git Plugin:

  • Not bound to Git SCM only
  • Allows the usage of ant file pattern to delete only some files or directories


An important behavior of the Git plugin's "Wipe out repository & force clone" option is that it will delete only the repository subdirectory if you have selected one in the "Check out to a subdirectory" option. It will leave the rest of your workspace alone. This doesn't appear in the documentation as far as I can tell.

You can achieve similar behavior with the Workspace Cleanup plugin by specifying the clone subdirectory in the "Pattern for files to be deleted" Advanced configuration section.

The end result is exactly the same, but in my observations the Git plugin deletion was 5 seconds faster than the Workspace Cleanup plugin.