How to really delete TWiki attachments from the Trash
Moving lets you transfer an attachment from one topic to another. The soft delete moves an attachment to the special TrashAttachment topic in the Trash web, where it’s hidden but can be “undeleted” with system administrator access. Click on action on the file in the FileAttachment table, then in the Update attachment screen choose [Move attachment], and make your changes to that screen. But what if you really want it gone. You may have data retention issues to deal with and then you have to get rid of things completely. Keeping stuff in the Trash can indefinitely just cut it.
Hey bob, what’s up? … uh huh, yeah … Wait, what do you mean you can’t delete things from the TrashAttachments page bob, you’re an admin, just go to the Trash page and delete it from there.
====Oops, that’s not going to work.====
There’s one simple reason why it’s dumb to not allow administrators to permanently delete things from the TrashAttachments area. You can’t replace those attachments on real content area pages because they already exist on this one special page called “TrashAttachments”.
Okay fine, you don’t want people to empty the trash. How about creating another area called ReallyDeleted or something else that’s not tracked and doesn’t interfere with the rest of the wiki. Having to go to a shell to manipulate the twiki files is just poor form.
===Manually deleting from the shell===
Delete the actual attachments in this directory:
Edit these files and remove all references to them:
If you want to take out all the trash in one go, just leave the headings in those two files, or recreate new ones (with a cron might be nice, if you want to do this on a period basis) and then delete everything in the pub/Trash/TrashAttachment/ directory.