Thanks for the suggestion but (thankfully) that doesn't seem to make any difference.
I was able to finally delete the file after restarting the Playdate.
Another part of my code does create a file object on the same path and never explicitly closes it. I assumed the Lua GC would close it eventually, or at least exiting the game would, but maybe not. Hopefully putting an explicit :close() in there will fix the problem.
It looks like that's the problem, unlike macOS the device filesystem won't let you delete an open file. That behavior doesn't appear to be configurable (and hacking it in seems like a bad idea) so as a first step I'll document that and add an error return to the function. Ultimately I'll add open file tracking to the simulator so we can replicate the behavior, but that might be a Part 2.
Thanks Dave. A docs update would be great and an error message would be even better.
I don't need the simulator file delete functionality on device but it's surprising that even closing/restarting the process apparently doesn't close the file handles.