Deleting published files while item is still in Published status

I’m wondering if anyone has already found a solution to this problem…

We have a content type that we use to publish two files - one primary web page, and another additional file. The primary web page file should always be produced during publishing, but the additional file is only published if certain fields are filled in. We’ve implemented this using a JCR query in a content list to only select items that have those fields filled in, and then publishing the additional files for those items.

The problem happens when the item’s fields change (item is put into Quick Edit, fields changed, and then Republished), and the additional file should no longer be published. We don’t currently have a way to select those items and DELETE the additional file that was created on the previous publishing run. Although new additional files won’t be created, the existing additional files are still sitting on the file system. Right now, we’ll just have to plan to delete the files manually from the file system.

Has anyone built a solution for this kind of scenario? All suggestions are welcome.

-Kathleen