# Workspace directories deleted monthly

**URL:** <https://community.jenkins.io/t/workspace-directories-deleted-monthly/830>\
**Category:** Ask a question\
**Created:** [November 17, 2021, 6:49pm UTC](https://community.jenkins.io/t/workspace-directories-deleted-monthly/830 "2021-11-17T18:49:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![twurgler](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@twurgler](https://community.jenkins.io/u/twurgler)\
**Post date:** [November 17, 2021, 6:49pm UTC](https://community.jenkins.io/t/workspace-directories-deleted-monthly/830/1 "2021-11-17T18:49:31Z")

</div>

My build directories in my work-space are removed on the first day of the month.  
It has happened now for 3 months in a row (since I started using Jenkins).  
Why does this happen and how can I control it (NOT remove them)?  
thanks

---

<div class="post-metadata">

**Author:** ![mtughan](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mtughan/32/91_2.png) [@mtughan](https://community.jenkins.io/u/mtughan)\
**Post date:** [November 17, 2021, 6:55pm UTC](https://community.jenkins.io/t/workspace-directories-deleted-monthly/830/2 "2021-11-17T18:55:04Z")

</div>

Hi @twurgler,

What kind of directories are being removed? Like the whole workspace directory on the agent is being removed/emptied? Presumably, there’s no configuration in the pipeline or job that should be removing the workspace and recreating it?

---

<div class="post-metadata">

**Author:** ![twurgler](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@twurgler](https://community.jenkins.io/u/twurgler)\
**Post date:** [November 17, 2021, 7:57pm UTC](https://community.jenkins.io/t/workspace-directories-deleted-monthly/830/3 "2021-11-17T19:57:34Z")

</div>

Hi

The $HOME/jenkins-workspace/workspace/{project name} directory still exists.

There are 2 directories under that yet that have the source I compile. These 2 directories are git directories that the Jenkins first does a “git pull” to update them from the master repository. These 2 directories were initially created with “git clone {main repository}”.

So during the month, I run Jenkins using a pipeline, multiple times a week. There are no lines relating to removing those 2 directories. We found a log for Nov 1 where Jenkins deleted the 2 directories once again. So I have to clone them again and continue on.

So right now I can’t find that log again to show you.

---

<div class="post-metadata">

**Author:** ![timja](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/timja/32/7_2.png) [@timja](https://community.jenkins.io/u/timja)\
**Post date:** [November 17, 2021, 8:03pm UTC](https://community.jenkins.io/t/workspace-directories-deleted-monthly/830/4 "2021-11-17T20:03:33Z")

</div>

It’s this: [Jenkins Features Controlled with System Properties](https://www.jenkins.io/doc/book/managing/system-properties/#hudson-model-workspacecleanupthread-retainfordays)
