Force empty the trash when getting the File is in Use error on OS X.

Probably one of the few really, really, REALLY annoying things about using OS X is when you try to empty your trash and you get greeted by that nice little popup that says something along the lines of “Hey! We can’t delete this file, you’ve got it open somewhere!” even though you are 105% sure you don’t have it open at all and you just want the file to disappear from your hard disks.

While it is an annoying little issue it is actually fairly simple to fix, in the terminal you can quickly kill a file even if some random program is still telling OS X it’s using it. You can safely do this, 99.9% of the time it won’t cause any of your apps to freak out or anything.

To do this navigate to your Spotlight and search for Terminal (or just, open terminal if you know how otherwise):

Screen Shot 2013-02-10 at 3.45.57 PM

You’ll get a nice little nerdy window that looks like this:

Screen Shot 2013-02-10 at 3.46.41 PM

Once inside of the terminal type the following:

rm -rf ~/.Trash/*

Then hit the enter/return key to trigger the command.

annnnd POOF! You should see your trash can magically go empty, without even so much as a prompt. It’s not the most revolutionary of tips but if you’ve been struggling to get a file deleted and OS X was giving you a hard time you’ll find this pretty useful!

Another method you can use if you are an Alfredapp user is to download this extension. That’ll allow you to execute the command I just posted about above by simply typing “Force Empty Trash” in Alfred’s window.