# Cleanup misses folders

**URL:** https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792
**Category:** Discussion
**Created:** [June 9, 2020, 3:45pm UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792 "2020-06-09T15:45:06Z")
**Posts on this page:** 7
**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 9, 2020, 3:45pm UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/1 "2020-06-09T15:45:07Z")

</div>

Hi,

we have noticed, that for directory “ci\_ws\ws” clean up does miss some sub-directories. It appears, that Continua does cleanup by checking existing projects/configurations. However, if they get deleted, the cleanup misses to remove the build artifacts. This is just an assumption. Whatever… imo the folder should be checked by age of builds, so that all out-dated builds get deleted. This has lead to blocking disk usage of our buildserver. We deleted them manually, now.

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 10, 2020, 12:15am UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/2 "2020-06-10T00:15:11Z")

</div>

Hi Thomas,

When the cleanup runs it iterates all configurations including deleted/archived configurations. If a configuration has been marked as archived in the database, it cleans up all builds (workspace and database) associated with that configuration. Otherwise, only out-dated builds get deleted according to the cleanup policy.

If you can see a case which does not fit these rules, then we would be interested in finding out more. Does the build exist in the database with an id the same as the folder? Is its configuration marked as archived in the database? What is the build policy for the configuration? We can provide the SQL statements to help diagnose a cleanup problem if required.

---

<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 10, 2020, 10:43am UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/3 "2020-06-10T10:43:54Z")

</div>

> [@Sparky](#):
>
> When the cleanup runs it iterates all configurations including deleted/archived configurations

How do i archive a configuration?

---

<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 10, 2020, 10:49am UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/4 "2020-06-10T10:49:20Z")

</div>

Thanks for your feedback. The builds which do not get deleted, exist in the agent workspace. We have configured the agent cleanup policy to **not** delete failed builds (for debugging purposes). Do failed agent builds ever get deleted?

---

<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 10, 2020, 12:28pm UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/5 "2020-06-10T12:28:05Z")

</div>

When you “delete” a configuration, it is not actually deleted from the database but row is marked as archived. That’s just an implementation detail really.

---

<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 10, 2020, 12:28pm UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/6 "2020-06-10T12:28:42Z")

</div>

The agent build workspace should get cleaned up when the server build workspace gets cleaned up (due to the Server Cleanup Policy).

---

<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 10, 2020, 12:49pm UTC](https://www.finalbuilder.com/forums/t/cleanup-misses-folders/6792/7 "2020-06-10T12:49:51Z")

</div>

Thanks for your help Dave. I’ll have an eye on it and let you know, if i have relevant information.
