With the way that Azure apps work there are restrictions on how you can achieve this. However using a Powershell script and FTP module is probably the best option in your case.
There is a good example on how to do this in this StackOverflow answer:
That answer has two methods but arguably the FTP module is the cleaner of the two and controlled within Octopus with your project variables available to you as a result.
Ah thanks for that idea. I didn’t consider using a custom webjob to clean up the directories.
I’ll have a look at that as at the moment we’re using the KUDU API and passing a command to delete the files. This feel a bit dangerous though so we might consider the webjob option.