# Cleaning up builds / Orphaned files and folders

**URL:** https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248
**Category:** Discussion
**Created:** [October 6, 2014, 1:40am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248 "2014-10-06T01:40:50Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [October 6, 2014, 1:40am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/1 "2014-10-06T01:40:50Z")

</div>

I’m currently inspecting the disk space of our build server and i found many builds where we already deleted the configuration but the files are still there.  
Didn’t you implemented/fixed something in the past that should deleted these orphaned files?  
  
Some folders (ids) can be still be opened using&nbsp;[http://server/project/ci/builds/view/2906](http://server/project/ci/builds/view/2906) showing up the build page. when i click on the configuration name, i get the error page, which is correct because we deleted it.  
  
All the other folders are still there but not cannot be accessed using the site using any known link.

---

<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: [October 7, 2014, 8:15am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/2 "2014-10-07T08:15:44Z")

</div>

Hi Christian,  
  
Thanks for reporting this. I’ve looked through the code and there is a place where we are excluding archived configurations from the build cleanup. We’ll get a fix out in the next release.&nbsp;

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [October 10, 2014, 8:01am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/3 "2014-10-10T08:01:19Z")

</div>

that orphaned ones seemed to be gone. gained 4GB of space back. but there are still some builds that should have a cleaned up workspace.   
 My policy for testing is:   
  
 Age: 3 Days   
 Minimum: 3 Builds   
 Maximum: 5 Builds   
 Cleanup: all but Database   
  
 Now i have many builds (at least 50+) that still have files in the workspace from different configurations (that still exist). i do not have overridden any cleanup policy nor is any of these builds pinned.   
  
 So maybe i misunderstood something or something is not working as intended

---

<div class="post-metadata">

### Author: ![peter.toms](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@peter.toms](https://www.finalbuilder.com/forums/u/peter.toms)
#### Post date: [October 10, 2014, 8:38am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/4 "2014-10-10T08:38:13Z")

</div>

Hi Christian, thank you for getting back to us. We will need some further information in order to troubleshoot this one further.   
  
 - Are any of these builds pending promotion? (we cannot cleanup these ones due to the possibility of a later promotion). If this is the case you can enable the setting ‘enable stage promotion timeout’ within the associated stages (note that this will only take effect on builds going forward), or stop the build, which will allow the builds to again be eligible for cleanup)   
  
 If the above is not the case we will need more detailed diagnostics;   
  
 - Please send us a debug log for a cleanup run ([http://wiki.finalbuilder.com/display/continua/Debug+Logging](http://wiki.finalbuilder.com/display/continua/Debug+Logging)), go into one of the configurations that is not being cleaned up and select the “save and run cleanup now”. Please also generate a diagnostics report ([http://SERVERNAME/administration/events](http://SERVERNAME/administration/events)) and select diagnostics report from the top box.   
  
 Please send these details to [support@finalbuilder.com](mailto:support@finalbuilder.com) and we can look closer.

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [October 10, 2014, 8:47am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/5 "2014-10-10T08:47:26Z")

</div>

hm ok, sounds pretty simple. the promotion ist our last stage called deploy and for all those old builds this option was not available.   
 Now i set it to 72 hours but i assume that those all builds will not be changed, so this only applies to new builds?   
  
 If so, how to “stop” all those all builds?

---

<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: [October 13, 2014, 2:21am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/6 "2014-10-13T02:21:07Z")

</div>

Hi Christian,  
  
Yes - this will only apply to new builds. &nbsp;Currently you have to click the Stop button for each build. &nbsp;We need to add a Stop All button which will also allow you to optionally stop all but the latest build awaiting promotion. This is now on our to-do list.&nbsp;

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [October 13, 2014, 8:11am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/7 "2014-10-13T08:11:22Z")

</div>

ok, i won’t stop all those 5000+ builds \* …

---

<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: [October 13, 2014, 8:35am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/8 "2014-10-13T08:35:40Z")

</div>

Hi Christian,  
  
It’s safe to delete any for old build folders manually if you no longer need to promote or view the log file. I’ve set the priority high for the Stop all Builds button task.&nbsp;

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [November 4, 2014, 2:20am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/9 "2014-11-04T02:20:35Z")

</div>

is there any concrete schedule for the “Stop all previous builds” button or do i need to extend our virtual build server harddisk?

---

<div class="post-metadata">

### Author: ![humanaemt](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/h/87869e/32.png) [@humanaemt](https://www.finalbuilder.com/forums/u/humanaemt)
#### Post date: [November 4, 2014, 6:54am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/10 "2014-11-04T06:54:59Z")

</div>

If you are considering functionality to “Stop All Builds”, can you also consider adding the functionality to “Stop all builds within one or multiple Projects”? Thanks

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [November 4, 2014, 10:36am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/11 "2014-11-04T10:36:12Z")

</div>

This feature should be available soon, the team is currently merging & testing a bunch of changes, preparing for a release. Stop all builds will be a per configuration feature only. There is also the “Enable Stage promotion timeout” feature on stages in the current release, if you are not already using it I recommend adding it to your manual promote stages.

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [November 7, 2014, 8:22am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/12 "2014-11-07T08:22:42Z")

</div>

Die “Stop all builds” button ran into an client side timeout but the server has stopped all (6500) correctly. Now i got 50GB of space back thank you.

---

<div class="post-metadata">

### Author: ![peter.toms](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@peter.toms](https://www.finalbuilder.com/forums/u/peter.toms)
#### Post date: [November 9, 2014, 11:17am UTC](https://www.finalbuilder.com/forums/t/cleaning-up-builds-orphaned-files-and-folders/5248/13 "2014-11-09T11:17:44Z")

</div>

Hi Christian that’s great news &nbsp; Happy to hear that this is all sorted now.
