Help! How do I delete attachments that are out of control?

I want to create releases and I upload the attachment to the release. But after I successfully uploaded the attachment, I accidentally refreshed the page. Therefore, the file that has been uploaded to the server is not displayed, but it still exists in the server’s attachments folder.
How do I delete files that are out of my control in the dashboard?

See this bug filed on GitHub: DB Inconsistence on attachment table · Issue #16783 · go-gitea/gitea · GitHub. I am not sure how to clean them up properly, but perhaps someone with more knowledge could respond.

You could try asking in that bug to get it back on Gitea’s radar and also maybe get useful workaround.