How To Get Rid of Locked Files to Empty the Trash
Posted 04/13/2011 at 11:30am
| by Cory Bohon
I cannot empty my Trash in Mac OS X. When I try to do an Empty Trash or Secure Empty Trash, it says, “The operation can’t be completed because an unexpected error occurred (error code -8003).”
This error is generally due to locked files that you’re trying to delete. One surefire way to empty the Trash is to open the Terminal (located in /Applications/Utilities), type the following command, then press Return:
sudo rm –rf ~/.Trash
You’ll be prompted for your administrator password, and then the Trash will be forcibly emptied. After logging out and back into your account, the Trash should begin working just as before.

This command will force Mac OS X to empty the Trash in your user account.
GOT A TECH QUESTION OR A HELPFUL TIP TO SHARE?
Email ask@maclife.com or write to Mac|Life,
4000 Shoreline Ct, Suite 400, South San Francisco, CA 94080