Server Task retention


Octopus Version:

We have been running an Octopus server for a few years now and have noticed that our Storage\OctopusServer\ActivityLogs folder seems to be rather large in size.

These files go back to when we setup the server. They seem to relate to a) Server tasks or b) deployments for releases which have since been removed.

Looking on the Tasks page in Octopus we do indeed have several thousand pages of server tasks (Delete Release, Delete Project)

What is the best way to clear these server tasks up?

Hi Dan,

Thanks for getting in touch! The ActivityLogs in 2.6 are your deployment/task logs. These should be cleaned up when releases and tasks are deleted, but in earlier versions of 2.x this was not the case so there will be some orphaned files.
You can delete the older files if you are sure they do not have corresponding data. It is relatively safe as it will not break anything, the UI will display a message on a task page that the file cannot be read if there is a task still remaining for it.

If you have plans to move to 3.x we did make sure the migrator for your data would not migrate any orphaned documents to account for this as a safe way to do it. You could write a script to determine if there are tasks in the database for each file before deleting if you wanted to be sure. (Any task is stored in those logs including health checks, upgrades, adhoc tasks etc it is not just deployments so there will be some old tasks that do still exist.)


Hi Vanessa,

Thanks for your reply, we shall look at manually clearing the ActivityLogs folder.

Can you clarify please should the server tasks be getting automatically removed?
We have thousands e.g. Delete Release.

Hi Dan,

So I have dusted off an old 2.6 VM and have confirmed that we did not delete these files with the deployments or releases in 2.6. I wasn’t 100% sure when that was implemented it was a while ago.
The only option will be manually clearing them. Maybe backup into a zip file for storage and then delete as a backup method.

Are you planning on upgrading to 3.x in the future?