Most of us have to deal with this from time to time: a file just refuses to be deleted from the computer. You put it in the Trash, click empty trash or secure empty trash - and get an error message: Can't empty trash because it contains locked files.
To force trash to delete a locked file:
Click on the Trash icon in the Dock and hold. When onscreen prompt menu opens, select Empty Trash
And Trash deletes locked files without arguing with you.
Note: I must credit this tip to David Pogue, the author of Mac OS X: The Missing Manual. The book is absolutely invaluable to anyone working on a Mac, from beginners to seasoned users.