Cleanup xml-data directory on remote agent

Ralf Hupe I'm New Here Nov 16, 2017


we are encountering some cleapnup / expiry issues on remote agents (6.0.3 and 6.2.2).

Global expiry settings do not seem to purge xml-data dirs on remote agents, even if the settings should find several files.

Now we are looking for a best (or recommended) practise solution to get some free disk space.

Would a script like this be useful and secure in consistency matters?

find /srv/bamboo/bamboo-agent-home/xml-data/build-dir/ -maxdepth 1 -type d -mtime +14 |xargs rm -rf


1 answer

1 votes

Hi Ralf,


Build expiry doesn't clean off the data from the remote agents. It looks after the bamboo server data only.


There are few improvement requests already in the system for the same:

Since the agents transfer the build artifacts and other data to Bamboo, there is no relation so you can use the command which you have mentioned to clean the data which is 14 days older or whatever your requirement is.

I believe that Clean working directory after each build option in the Plan configuration is the proper solution for this problem.



Ralf Hupe I'm New Here Nov 16, 2017

Hi Robhit,

thank you heaps for the hints. I was aware of the "Clean working directory after each build" options but we were looking for a more global solution. To prevent to reconfigure every single build plan.

Hi Ralf,


I was thinking of having a script in the machine where the remote agent is.

Then use this script to check for disk usage at a certain time interval.

If the disk usage reaches 80% or whatever, execute the command which you mentioned earlier to delete the data from the agent directories.



Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,075 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot