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.

Technical notes, and other ideas.
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.