Is there an an API for deleting a file?

Is there an API to delete a file by phid? I know I can use the remove destroy phid command, but was hoping there is a more elegant solution to this? Because deleting with the remove command will leave behind something like {F##}


Which behavior would you expect instead, if someone referenced that file already in a comment or such?

I am ok with the {##} marker to remain there as it indicates that a file was uploaded, but just wondering if there was more of an elegant way to delete the files.

The “file” section at does not list any delete function, so I assume the answer is no.