I am trying to delete a couple of files from a document library, but SharePoint 2013 tells us that "the file is currently checked out or locked for editing by another user".
However, when attempting to undo the checkout using code (SharePoint Client Object Model aka. SCOM), an exception is raised that states that the file is NOT checked out. Also, when including the "Checked Out To" column in the list, the field is blank and the "CheckOutType" property of the file in SCOM returns "None".
Using SharePoint Client Browser I found that there is what seems to be an invalid user reference in the "Checked Out To" column when viewing the Raw List Data:
I have no idea what might have gone wrong. We cannot delete the files or check them out or in. The files do not appear under "Manage files which have no checked in version".
How do I delete these files permanently?