I found your response very interesting...
Without meaning to query your decision, can you explain why you can't use a "non-free solution".
It seems to me that you've already spent a lot of money on LiveCycle, so you've already commited to using a "non-free solution".
Why not spend a bit more and end up with a solution that solves all your problems?
Instead you seem to be about to spend a whole lot of time and effort to come up with a solution for a problem that we've already solved. Isn't your time also worth something? For the record, it took somewhere around a man-month of effort to build the purge tool, by a developer who already had a whole lot of experience with LiveCycle - and you can buy it for the price of a few days of your time.
I would very much like to get an understanding of your reasoning, and look forward to your response.
It's possible to delete attachements with the TaskManager API :
TaskManager taskManager = TaskManagerClientFactory.getTaskManager(_Factory);
I never tested it but suppose that it will delete the document from the GDS.
I've juste tested id and and unfortunately it does not Work !
The function only delete the line in the Database but not the document in the GDS!
Isn'it a bug ??