How to Force Empty Trash in OS X
Emptying the trash in OS X is easy, but if stubborn files refuse to delete with the rest of the trash a keyboard shortcut can force empty trash in Mac OS X.
I previously showed you how to empty your trash in OS X even if some of the files or folders are locked, but that trick couldn’t remove some troublesome files.
This hint involves a simple keyboard shortcut that you use as you empty the Trash.
Start by pressing and holding the right mouse button on your trash icon on the dock or in finder. Optionally you can use use the CONTROL+CLICK if you don’t have a right mouse button.
A context menu appears. Now hold down the OPTION key and slide the mouse pointer up to the Empty Trash item in the menu without releasing the mouse button. This will remove all the files in the Trash no matter what. It forces OS X to get rid of pesky files even if they’re locked or corrupted.
What If That Doesn’t Work?
I found another trick that involves a little more advanced work in OS X Terminal, but might come in handy if your Trash folder gets really messed up. It involves deleting the folder and recreating it. Since it requires typing commands in Terminal, be careful. If this scares you, then don’t bother. Get someone who likes mucking around in the OS X Terminal app to help you. However, if you follow the steps exactly, then you can do this.
First, log into an Admin account to make this work. Once you log into the Admin account open Terminal via your Applications folder under Utilities or by using the COMMAND+SHIFT key combo to open Spotlight. Type Terminal and select the app from the menu that drops down from the upper right corner of the screen.
Type the following, if you’re working on your Admin account:
sudo rm -ri ~/.Trash
To work on an account other than your Admin account, like a family member or co-worker’s account, type the following:
sudo rm -ri /Users/user_name/.Trash
Substitute the user name in the above line. For example my account uses the name Kevin so I would type:
sudo rm -ri /Users/Kevin/.Trash
Keep in mind that you must use the above commands exactly as typed. You might just want to copy and paste them from your brewer into Terminal. Also, there’s a single space after the command sudo, rm and -ri.
After typing the proper command hit the Enter/Return key and type your Admin account password. Hit Enter/Return again and then type Y for Yes when prompted. This deletes each file in the Trash folder so, if you’ve got a lot of files in there, then it might take a long time. I’d empty as many of the files as you can using the above method before attempting this trick to save time.
You know you’re finished when the Terminal Prompt returns. It looks like the black box at the of the line in the screen shot below:
You’re not done yet. Be sure to log out of the account that you fixed. Then log back into the account and OS X will create a new empty Trash can that’s no longer corrupted.
Hit the link at the beginning of this section for more Trash can tricks, with many thanks to The X Lab for this helpful tip.