Mac What’s Locking File

Refer: http://apple.stackexchange.com/questions/22259/how-to-check-whats-locking-a-file

$ sudo lsof | grep -i looking-for

You will still need to kill the process and you can try the rm command too.