# Can I prevent Jenkins from clearing the workspace on a SVN error?

**URL:** <https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211>\
**Category:** Using Jenkins\
**Tags:** question\
**Created:** [October 16, 2023, 10:49pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211 "2023-10-16T22:49:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://community.jenkins.io/u/Matt)\
**Post date:** [October 16, 2023, 10:49pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/1 "2023-10-16T22:49:35Z")

</div>

Hey folks… sometimes things go wrong with a SVN checkout (or other issue) and usually Jenkins wants to blow away the entire workspace and start fresh. I get the logic, however my project takes about 2 hours to check out, and then about 3-4 hours to import into Unity. I’d much rather manually fix the problem when it arises. Any way to disable this functionality?

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 19, 2023, 12:59pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/2 "2023-10-19T12:59:40Z")

</div>

Hello @Matt and welcome to this community. 👋

In Jenkins, the behavior you’re describing is part of the default settings for Jenkins pipelines, where Jenkins cleans the workspace by default before starting a new build. 🤷  
This is often the desired behaviour to ensure a clean and reproducible build environment. However, I think you can adjust these settings to meet your specific requirements.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/4/48b4df0c37adad4630d2f9e6d8a5e737e876c7f1.png)

Is that “_Delete workspace before build starts_” checked on your pipeline configuration?

---

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://community.jenkins.io/u/Matt)\
**Post date:** [October 19, 2023, 4:11pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/3 "2023-10-19T16:11:25Z")

</div>

Thanks, but the “Delete before build starts” is not the issue. It appears to be in the SVN module. If any problem is detected during the checkout process, say a file is locked, then Jenkins clears the entire workspace and does a fresh checkout. This results in a 6 hour ordeal rather than the 15 seconds it would take for me to manually fix the checkout. I don’t see an option anywhere to change this behavior, but I could be missing it.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [October 19, 2023, 4:13pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/4 "2023-10-19T16:13:35Z")

</div>

I don’t know either then, sorry.  
Hopefully, someone more knowledgeable will chime in… or you could [open an issue](https://issues.jenkins.io/secure/CreateIssueDetails!init.jspa?pid=10172&issuetype=2&priority=4&components=15485) on the plugin JIRA

---

<div class="post-metadata">

**Author:** ![psecker](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@psecker](https://community.jenkins.io/u/psecker)\
**Post date:** [May 21, 2025, 9:54pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/5 "2025-05-21T21:54:00Z")

</div>

I have the same issue, is there a way to debug this before opening a Jira?

---

<div class="post-metadata">

**Author:** ![bpedersen2](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bpedersen2/32/367_2.png) [@bpedersen2](https://community.jenkins.io/u/bpedersen2)\
**Post date:** [May 26, 2025, 12:52pm UTC](https://community.jenkins.io/t/can-i-prevent-jenkins-from-clearing-the-workspace-on-a-svn-error/10211/6 "2025-05-26T12:52:08Z")

</div>

In the code I see 3 different updaters:

UpdateUpdater  
UpdateWithCleanUpdater (this one does the workspace delete)  
UpdateWithRevertUpdater

That is selectable (`SubversionSCMSource /config-detail.jelly` does show an updater field) in the checkout step (but not the svn step!) aus update method.
