Delete a user with rails - fails - #5 by andreas.krupp does this help?
TL;DR: (backup first)
sudo -u your-zammad-admin zammad run rails c
article = Ticket::Article.find(12345) #find your article
article.attachments.pluck(:id, :filename) #look at all the attachments before deletion
article.attachments.each(&:destroy)
SearchIndexBackend.update_index(article.ticket)
exit