# Cleanup policy for agent workspace

**URL:** https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797
**Category:** Discussion
**Created:** [June 17, 2020, 8:36am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797 "2020-06-17T08:36:36Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [June 17, 2020, 8:36am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/1 "2020-06-17T08:36:36Z")

</div>

Hi,

usually i am interested in the build history and some artifacts. Both are stored in the server workspace. This can be controlled with minimum/maximum settings. However, i am interested more in the build history, rather than the complete build artifacts (of the agent). If i reduce the minimum setting, i will free the agent workspace, that i am no longer interested in. However, this will reduce the number of entries in the build history. Imo the agent should have its own cleanup policy for the workspace.

Thomas

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [June 17, 2020, 9:21am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/2 "2020-06-17T09:21:38Z")

</div>

Hi Thomas,

The agent workspace cleanup policy is, to a certain extent, separate. It runs when every build finishes. If you tick the “all of above” tick box, then the agent workspace will be cleaned up for every build regardless of the server cleanup policy.

As you are not interested in the agent workspace, this appears to fit your requirement?

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [June 17, 2020, 9:35am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/3 "2020-06-17T09:35:38Z")

</div>

Hi Dave,

not sure, if this fits. For debugging purposes we generally have disabled “[] fails”. We have set mininum builds to 1 and maximum builds to 2. I noticed, that one build which failed, does not get deleted. Not even after the seven day cleanup build age.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [June 17, 2020, 9:49am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/4 "2020-06-17T09:49:42Z")

</div>

It should clean up, I’ll do some testing tomorrow and see if I can reproduce.

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [June 17, 2020, 9:56am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/5 "2020-06-17T09:56:21Z")

</div>

Ok. Thanks!

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [June 18, 2020, 12:56am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/6 "2020-06-18T00:56:06Z")

</div>

Hi Thomas,

Can you share your full cleanup settings? I think the issue is that the server policy only cleans up the agent workspace, after the whole server workspace is cleaned up. If you only cleanup up one workspace area, e.g. Other Files, then the agent workspace remains.

According to the description on the cleanup page, the server policy should clean up the agent workspace every time it runs regardless on the “what to cleanup” options. We’ll work on making that happen for the next version.

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [June 18, 2020, 8:48pm UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/7 "2020-06-18T20:48:25Z")

</div>

![CCI_CleanupPolicy](https://www.finalbuilder.com/forums/uploads/default/original/2X/0/0b9c3867db2f15cc16dd8a95b712811f75133fed.png)

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [June 18, 2020, 8:59pm UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/8 "2020-06-18T20:59:02Z")

</div>

Hi Dave,

i have just noticed, that one of the 3 configurations, which override the default is configured to cleanup every 14 _ **months** _. I did not have the chance yet, to ask my teammate, if this is by intention.

 ![ConfigPolicy](https://www.finalbuilder.com/forums/uploads/default/original/2X/d/dd44ef92bd8ce4a5db75e02b4def80d50c262ab3.png)

Nevertheless, it should be possible to configure the duration for storing build logs and server artifacts independently of the agent workspace. We have some projects, such as the one mentioned in this post, that take up to 8 GB of disk space. We don’t want to store several of those builds entirely, nor do we need them.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [June 18, 2020, 11:23pm UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/9 "2020-06-18T23:23:32Z")

</div>

Yes, we agree. We would like to have multiple cleanup policies, to allow you to set different maximums and ages for each separate cleanup item. This has been on our to-do list for some time, but it’s not a quick task and requires some thought to ensure that we get it right. I can understand how this is a priority for you, so will spend some time looking into what we would need to to do today.

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [July 14, 2020, 6:29am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/10 "2020-07-14T06:29:55Z")

</div>

Hi Dave,

any news on the topic?

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [July 14, 2020, 6:59am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/11 "2020-07-14T06:59:44Z")

</div>

Hi Thomas,

All I can say is that its being worked on.

---

<div class="post-metadata">

### Author: ![sa\_thomaslohrum](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sa\_thomaslohrum](https://www.finalbuilder.com/forums/u/sa_thomaslohrum)
#### Post date: [July 14, 2020, 7:06am UTC](https://www.finalbuilder.com/forums/t/cleanup-policy-for-agent-workspace/6797/12 "2020-07-14T07:06:29Z")

</div>

ok. Understood. Thanks.
