Subscribe to MacYourself via RSSSubscribe to MacYourself via EmailFollow MacYourself on Twitter
Apple Products and Accessories from Amazon.com

Trash won’t empty? The ultimate guide to deleting stubborn files

Trash won't empty? The ultimate guide to deleting stubborn files

Mac OS X occasionally gets hung up on stubborn files and refuses to easily delete them. If you can’t empty your Mac’s Trash, try some of these techniques to get rid of those nasty errors and clear out the junk.

As a Mac user, you’ve probably found yourself in a situation where you needed to force empty the Trash. Perhaps a message like “You do not have sufficient privileges” or “Error code -8003” kept popping up. In many (but not all) cases, troublesome files reside on an external volume or drive. Manually deleting Time Machine backups via Finder – which is a big no-no – commonly triggers these problems, for example. Other times, files on the main boot drive are in use by running applications and cannot be removed. There’s no shortage of possible scenarios.

Unfortunately there is no single solution for fixing a Mac with a Trash that won’t empty. So, much like MacYourself’s ultimate guide to ejecting a stuck disc article, we will explore a number of potential fixes. We’ll start off with the easiest and most common techniques first, then gradually move to the complex stuff that should only be attempted in the most dire situations. By the end, something should resolve your problem. Good luck!

Restart, then force empty

It’s amazing how many computer issues a simple system restart can fix. So, naturally, that is where we will start. But if you still can’t completely empty the Trash after restarting, let’s try forcing the issue. Click on the Trash icon in the Dock to open it in Finder. Hold down the Option key while clicking the “Empty” button. Still nothing? How about going to the Finder menu and selecting “Secure Empty Trash”?

Unlocking & renaming files

Are you getting an error that says the operation could not be completed because the item is locked? The first thing to do is look at the file(s) or folder(s) that are stuck. Do they have weird names? Remove any unusual characters (especially slashes), then try emptying the Trash again. If that doesn’t work, right-click on one of the stubborn files/folders and select “Get Info.” Is the “Locked” option checked? Uncheck it, close the Get Info window, and repeat this process for other locked items in the Trash. Try Option-clicking the “Empty” button now.

Third party applications

While applications from third party developers aren’t ideal for fixing OS X issues like this, they are a lot easier (and safer) than the next two techniques. Therefore, they’re worth a shot before moving on. Try downloading and installing the free Trash It! program. It just might be the answer to your prayers.

Repair disk & repair permissions

Sometimes files become corrupt and need some attention before they can be deleted. Insert your Mac OS X disc and boot to it by holding down the C key as your Mac turns on. When the disc has finished loading, go to “Disk Utility” under the Installer or Utilities menu (depending on your version of OS X). Click on your hard drive in the list to the left, then click the First Aid tab, and finally the “Repair Disk” button. If any errors are listed when it’s done, click “Repair Disk” again to make sure the error doesn’t come up a second time.

Next, click the “Repair Disk Permissions” button and let it scan the drive. This only needs to be done once. Repeat the “Repair Disk” and “Repair Disk Permissions” process for any external volumes or drives listed in Disk Utility as well. When finished, restart your Mac and try to force empty the Trash (as described above).

Terminal trickery

Now we’re getting into the ugly (but apparently necessary) stuff. I should warn you that executing the following command in Terminal could erase all of your data if you do not follow directions exactly. Backing up before proceeding is always a good idea, just in case. Launch Terminal, which is located in Applications > Utilities, and type the following command.

sudo rm -rf ~/.Trash/

This command temporarily takes advantage of the Root user (the “sudo” part) and deletes the data in your own user account’s Trash directory. Press Enter/Return to execute it. You will likely be prompted for your administrator password – type it and press Enter/Return again. Note that the cursor will not move and none of the characters you type will be shown. When the job is done, type “exit” (minus the quotes) and press Enter/Return before quitting Terminal.

Conclusions

Is your Trash empty now? I should hope so! If you’ve gone through all of the steps above with no success, you may be the victim of a peculiar case that cannot be solved with common techniques and tools. Feel free to describe the problems you’re having in detail in the comments below. Perhaps someone from the helpful Mac community might be able to assist you.

99 Comments Have Been Posted (Leave Your Response)

Well I made the fatal mistake of deleting files from my time machine. But worse was yet to come. I typed the terminal command you have listed above and behold I have lost my home folder thereby loosing two years of work. Have spent the last three hours on the phone to apple. The only hope I have is that I can copy an old backup file back to the “my book” and hopefully restore from there. So BEWARE before using the terminal command given

Thank you! The option button+empty trash did the trick on my old Powerbook G4.

I can’t access my finder or trash can. First the finder was bouncing up and down and a flashing screen appeared with the option to choose by restore windows or don’t restore windows. Now the bouncing and flashing have stopped, but I can’t access finder or trash, and if I restart my computer, I know the bouncing and flashing will start again.

In the terminal I first tried
sudo find / -name “.DS_Store” -depth -exec rm {} \;
But it said not a directory twice, and then stopped.

Then I tried your solution
sudo rm -rf ~/.Trash/
But nothing happens when I type in my password.

I don’t know how, but my Mac works now. I tried everything, and then it almost worked, so I took a shot and restarted my computer and then it worked! I lost everything on the desktop, though. I did a backup, but I’m afraid to use those things^^ When I restarted it was almost like when I started the computer for the first time, so I had to install some things again, but programs like Logic and Office was still there!

I LOVE YOU!!!!!!!!!!!! THANK YOU VERY VERY VERY MUCH!!!!!!!!

Thank you! After waiting for over 42,000 items to empty from my trash over a period of days (literally), your TrashIt! suggestion had the problem solved in 10 minutes. My computer, with is newly rediscovered empty memory, is so much better now.

Went through all these steps and also tried starting the iMac in safe mode (this got the trash empty) but I still kept getting the annoying Finder error. This trick worked though: http://www.fixkb.com/2012/11/mac-finder-is-continually-crashing-desktop-items-appear-to-be-missing.html

Thank you . Holding the option key and emtying the trash worked for me. Thanks so much

Tried to dump some old Time Machine backups and the trash wouldn’t empty (error code -8003). I couldn’t even put the files back on to my backup drive. I tried everything to no avail… UNTIL I downloaded TRASH IT! And it worked! Thank you, thank you for the excellent advice!

Emptying the Trash cannot be completed because “good” is locked. To Empty everything in the trash, including locked items,press the Option key while selecting Empty Trash

please help me…….

If the files once belonged to an external HD and they wouldn’t delete properly, try verifying and repairing your HD in Disk Utility.
Worked for me.

SIMPLE !!!
Change the file name juste change a letter !!!
It worked for me when nothing else did.

Thanks

THANK YOU!!!..omg i was trying to look for an answer on how to delete this!!..it totally worked..thanks again ^____^v

Larraine M. Duez
May 25th, 2013, 1:43 PM

Thank you Gina…tried the link you sent and after two years and 35,000 accumulated trash files…it emptied using the free “Trash It” app….Thank you!!!

Larraine M. Duez
May 25th, 2013, 1:45 PM

Sorry, I didn’t mean sent…but rather the link you posted…anyone not having success..needs to try it..it works!

The Option key worked for me Thank You!!! Had tried everything!!! Going to add your site to my bookmark bar right now ;)

If you trash a file which was transferred over Skype and try to empty the trash, mac os will not allow it. Closing the Skype application was my solution to the problem.

Option Key. Beauty!

Thanks so much for this.

I had hotspot shield, but got rid of it, at least I thought. I used App Delete to try and remove the rest of what was left. I also used ‘Trash it’. Now in my trash I have two App Delete tunnelblic items 09-31-21 and 18-41-39-153. I have tried everything that I know (which is not much) including ‘terminal trickery’, but cannot remove them.
I will be thankful for any ideas.

The first solution worked! Thanks a million!

Thank you so much. I had rendered out like a 7Kx4x or something like that, attempted to save a tiff image, and it corrupted into a 206 byte file, every time. I tried to delete it but it said it was open in another program. However there were absolutely NO programs open. I did the secure empty trash thing, and that worked. Thanks so much!

Worked but now when I go to move something to the trash I get a pop up window warning me that this file will be deleted immediately and that I can’t undo this action.
Any ideas?

My trash would not empty code 8003. As someone above suggested I created a folder on desk top and dragged the trash contents in there. I tried to delete that folder but got the same message so back to sqare one. On the extra desk top folder: I clicked on view and arranged by type.
Than the labour began. First I deleted the obvious single files into the trash and secure emptied.
That worked. Than after more trials I dragged and secured empty trash with files ending in dmg it worked but only one by one.
It seems that the system can not handle folders that have several folders or HTML documents so I had to delete those one by one into the trash and it could secure empty the now empty folder plus what was in it in one swoop with item count down.
I wanted to get rid of the Olympus software, that darn thing had 607 files in many sub folders, I needed to delete each file in several folders and it secure emptied. I could not get rid of the viewer so I put it back in Application.
I could not get quick books nor quicken off.
You probably think I am crazy. Just tried to get excess cleaned off since ESet Cyber Security caught
about 5 undesirable nasties with one Trojan on my wonderful I Mac.
I am glad if any one can do it easier than what I went through with this trash emptying. Non Mac, third party items are a pain to get rid of.
This program called Things gave me one reason why it would not delete “spot light is in use” I went to force quit but the spot light was not an option
So I am thinking it attached itself plus multiplied itself 3 times over with 600+ files in each folder and I never used the stupid thing. I am going to find a way to get rid of that windows type leech.
Maybe you can make sense of what I am trying to get across If not I apologize I am exhausted from this stupid ordeal. Best wishes

Hi,
I’m having difficulty emptying a folder called “LOL 8.33.03 PM” from my trash. When I normally empty, the noise happens, but the one folder won’t go. When I securely empty trash, it comes up with a message saying “You can’t copy the item “” because its name is too long or includes characters that are invalid on the destination volume.” and won’t empty. I’ve been told I must re-image my MacBook Pro but I don’t want to lose my 300GB on my 1TB EHD by backing up with Time Machine. Please Help!

This one worked for me. Click on the Trash icon in the Dock to open it in Finder. Hold down the Option key while clicking the “Empty” button. Still nothing? How about going to the Finder menu and selecting “Secure Empty Trash”?

Thank you SO much! The Terminal suggestion emptied my trash!
This was REALLY helpful!

The Terminal Trickery command line worked perfectly for me. Those stubborn files have been bugging me for months! Thanks. :)

Carmine DeFrancesco
November 13th, 2013, 8:06 PM

Wow! I have never had any luck with on-line advice. But I held down the option key and clicked empty and viola! empty bin. Thanks

This is ridiculous APPLE. I am so pissed off as I might lost $1000 of work – because I need to free space of a whole presentation / video I just did, and the damn trash will not empty.

This should be a difficult thing.

“Trash” emptying solved by using “Secure Empty Trash” in FINDER and holding down OPTION key.

Thank you guys so much! Helped me super quick!

Common errors upon attempting to empty trash include:

“ the operation cannot be completed because the file is locked” or ” the
operation cannot be completed because the item is in use”

1..drag the file from the trash to your desktop
2..launch the terminal and type the following into the terminal window
leaving a space after the f

3.. cd ~/.Trash && sudo rm -rf

4..drag the file from your desktop to the terminal and then press enter
5..enter your password when promped and press enter

THANK YOU!!!!! x 100000000000000000

Install Ubuntu instead of MAC

For those of you who manually deleted time-machine from an external. Try this. it worked for me after all other fails.

This technique uses a hidden feature of Mac OS X to force the Trash to empty. Perform the following steps in the order specified:

1. Press and hold the mouse button on the Trash icon in the Dock. ….The context menu for Trash will display.
2. Press and hold the Shift-Option keys together
3. (still holding keys) Select Empty Trash from the context menu for Trash.
Release the keys pressed and held in step 2.

I tried to dump something from time machine on my external drive. When i open the drive, the item is in the trash. It is a package of zero bytes, and when i try to delete it, it says, “The operation cannot be completed because item …. is in use”. How can something be in use when there are 0 bytes? Thanks for your time

You rock! Worked on the first suggestion.

Excellent site! Had a prob for days now, this site clearly instructed me on how to sort it.

I simply downloaded CCleaner for Mac from the Piriform website. That took care of the problem so quick and easy!

I used sudo in Terminal and successfully deleted my trash, but now my trash and secure trash buttons are grayed out. If I put something in trash, it is deleted permanently. I’ve just found the last page of your site and see that I was supposed to type exit before I closed the terminal, which I did not do. Pilot error. How do I get the buttons back.

the first step work.
thank you thank you
very helpful :)

I have wasted now 2 days trying to find a solution to emptying my trash in Yosemite. The error message I get: The operation can’t be completed because an unexpected error occurred (error code -8060).

I’m not the only one with this problem but have not yet found a solution. I tried terminal as mentioned above. When I got to the where I needed to enter my p/w, I’d type and nothing would happen. Once in dozens of tries, it did empty my trash, but as soon as I put another document in the trash the problem persisted. Forced empty has not worked for me. I did read somewhere that changing permissions might work, and I got a link to open the ‘get info’ window for trash. I can no longer find that site nor the link to open the info window for trash. I’m pulling my hair out!!!

I used the terminal rm -rf ~/.Trash/ command and lost everything on my desktop and iphoto!!!! Anybody have any suggestions on how to recover these files?

HELP! Ran the command to force delete trash and it seems almost all data and application data, settings, etc are now gone, all files on desktop, most files in pictures, documents, etc. In a bit of a panic. How do I undo??

Wow, just wow! I have been restarting my computer so many times in an effort to delete this file! I held down “option” and clicked “empty” in the trash and ‘boom!’ it was gone! Thank you so much! I can’t believe how easy it was! :D

SHASHI KANT GUPTA
August 16th, 2015, 6:30 AM

Try “Long Path Tool ” is also useful in situations where you see these error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

Been three days trying to delete my trash and nothing seemed to work until I read MacYourself, thank you.

try this: open trash folder select all items and while clicking on empty trash press option… that did it for me after all the try outs with terminal and unlocking etc. finally!

i used monolingual to remove language files; trash filled with folders of languages (folder for each language) and when attempting trash, nothing. Every conceivable effort (terminal, trashit, etc etc) to no avail.

terminal log below.

rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/NSProManageLayoutDialogAquaCongruency.nib: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/NSProPreferences.nib: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/NSProPreferencesAquaCongruency.nib: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/NSProPreferencesClassicLarge.nib: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/Preferences.strings: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj/ProKit.strings: Operation not permitted
rm: /Users/BWFiles/.Trash//zh_CN 12-34-27.lproj: Operation not permitted
rm: /Users/BWFiles/.Trash/: Directory not empty
BW-MacBook-Air:.Trash BWFiles$ exit
logout
Saving session…
…saving history…truncating history files…
…completed.
Deleting expired sessions…none found.

Have Something To Say? Join The Discussion!

  (required)
  (required; will be kept private)
  (optional)