As a temporary work around (until CC supports deleting artifacts itself) you may want to add a cron job to delete builds over a set age.
Here is an example Unix shell script to do this:
#!/bin/sh
#
# Utility script that deletes CruiseControl build artifacts over a set age.
# Needed to prevent the disk becoming full. Designed to be invoked on a daily
# basis, e.g. from cron.
#
# Run as the cruise control user, to avoid wreaking havoc if it goes wrong.
#
# When CruiseControl supports deleting of build artifacts (like it does logs)
# then this script won't be needed.
#
# Set this to your CruiseControl Artifacts directory
ARTIFACTS_DIR=/home/build/cruisecontrol/cc-builds/artifacts
# Delete all artifacts over this age (days)
MAX_AGE=3
find $ARTIFACTS_DIR -mindepth 2 -maxdepth 2 -daystart -ctime +$MAX_AGE -exec rm -r '{}' \;
To run this script on a regular basis using cron, login as the user you are running CruiseControl as (ideally a non-privileged user) and run:
crontab -e
Here is an example cron setting to run the script at midnight every day, where "/home/build/cruisecontrol/delete-old-artifacts.sh" refers to the script above.
If you have configured log file deletion through the <delete> element then an alternative approach is to periodically delete all artifacts that do not have a corresponding logfile entry (assuming you are comfortable loosing old artifacts this way).
The attached perl script, although not as elegant as a native CruiseControl or Java/Ant solution, will achieve this:
It can be run from a CruiseControl config, eg. as a <execute> action in <publishers>.
Written in perl because that is what I know; I developed it for use in-house at my company.
See the README in the archive for more notes, and use examples.
Has a debug and test mode to help when setting it up.
Bonus! it also cleans up the the logfile's _cache folder.
I think lots of people achieve the same result by adding an additional project under CC that runs an ant script to remove the old artifacts.