Deleting most files on a Mac is usually straight forward but there are occasions when the system will not allow the user to complete the task without some additional input. One of the more common reasons for this is signified by the message, ‘The operation could not be completed because the item (its name) is locked.’ This is a safety feature, to stop the user from deleting a file that they either do not want to, or should not, remove. So the first question would have to be, do I really want to delete this file?
If you are quite sure that the answer is yes and you have Mac OSX 10.1 or later versions, then the first step is to simply try the following, which will delete locked files: press Shift-Option, or Option key at the same time as emptying the Trash.
If your machine has OSX 10.0 to 10.0.4 then you will need to unlock the file first. By clicking on the file you want to delete this will give you access to the File menu, here you will need to select ‘Get Info,’ followed by the ‘General’ option. This brings up a tick box labeled ‘Locked,’ which needs to be de-selected. The file can now be deleted by moving it to the Trash and then emptying it.
If a file cannot be unlocked using this method then there may be an issue with the permission granted to the user to do so. Click on the file once more and this time select ‘Ownership & Permissions’, the option ‘You Can’ needs to read ‘Read and write.’ To change this you may need to enter your OSX password, but after this the document can be unlocked and removed as normal.