Subscribe to MacYourself via RSSSubscribe to MacYourself via EmailFollow MacYourself on Twitter
Mini Displayport to HDMI adapter 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.

Share/Save It
Digg ThisStumbleUponDel.icio.usTwitterFacebook

26 Comments Have Been Posted (Leave Your Response)

Francis Kulesza
March 4th, 2010, 6:44 PM

Still have a file (alias) (“‘QM,[?]Op|) with zero size and “unknown access”
Have not been able to get rid of it. — any clues??
File probably came from deleting a Time Machine Backup.
Snow Leopard 10.6.2

Francis,
That sounds like a messy situation. As a general rule of thumb, never manually delete a Time Machine backup from Finder. It can only end in disaster. Have you tried renaming the file so it doesn’t contain any of those special characters?

I had stubborn trash files that wouldn’t empty. I was using “Secure Empty Trash,” and wasn’t sure that one of the force-trash emptiers would delete the files securely. So I went into the trash can and changed the filenames.

Like magic, the trash emptied securely!

I have an external back (Not configured as a time maching backup drive) FAT32 format from which I have deleted two directory folders. These folders were backed up from a PC that was long ago retired. The directories each contain three folders ‘my pictures’ ‘my documents’ ‘my music’ and are all empty…they will not empty from my MBP OS 10.5.8 trashbin. The resulting message says that I have insufficient permissions for some of these items. None of the steps listed above worked including using the sudo command in the terminal. Any thoughts?

problem solved. Relocated the files back to the external drive, then just hooked the drive up to a pc…delete, empty recycle bin…voila!

I have a file that’s 4KB in the trash, it won’t empty, normally or securely. Or with the terminal command.

It was a folder originally from my bootcamp partition, now it’s just a small file that ” sorta ” opens in terminal. When I say sorta I mean it doesn’t do much and terminal doesn’t seem to like it.

If I empty normally, it makes the sound of emptying, but everything but this file is deleted. When I secure empty trash I get the error ” the finder can’t complete the operation because some data in “care package” can’t be read or written. (Error code -36)

When I tried the terminal way, after typing “exit” it said process complete, but the fucking thing STILL didn’t delete.

Help appreciated.

Thank you so much!!!

My Time Machine deleted its oldest backups to make room for a new backup and now I have 7 Gb of files in the trash can that just will not allow themselves to be deleted. These files are from the Windows 7 NTFS partition on the Mac. I have tried all the Empty / Secure Empty options and Third party Trash can emptiers, have tried the Terminal command line suggestions (just wrecked my profile and had to restore my last backup)… I have been slowly removing files that I am able to remove to a folder and deleting them on another profile but there are still about 100,000 to go. Random files within the Trashcan when deleted cause the Mac to crash and there are stacks of those… At my wits end and I’m sure there is a way to do this.. Open to new suggestions Thanks johnT

Awesome! Force delete worked really well

i have 41,000,000+ items in my trash can…. tried the methods above with no luck, they are associated with an external usb, three folders two in greyed out text. Opening one folder releases a stream of other folders with what looks like individual files named from text taken from a block of text. reformat the usb?

I’m having the same issue as John T although there’s a heck of a lot more than just Time Machine files in my trash. I’ve been using Tinker Tool System 2 for years and, until recently, it always emptied trash fine. Have tried every solution on this page now. All still there.
Anyone have any insight?

I have run out of room on my hard drive and 1T external hd!!!

Thanks,
Kat

Similar issue with me.
On secure empty of the trash I get following Message “The operation can’t be completed because the item “Demos” is in use.” I have searched the trash and don’t have a “Demos” in my trash.
Any suggestions gratefully appreciated.

Thank you so much, I couldn’t empty my trash, and holding the Option and then pressing secure empty trash emptied it right away.

I have the EXACT same problem as Kyle. It was a Bootcamp folder as well. Have no idea what to do. HELP!

Thanks for the instructions, Fixed!

Worked for me a treat, 2.3 gig of trash cleaned out, thanks for taking time to put this into clear, easy to read and understand English. :)

My trash can says it has 8,988 files in it. When I click “empty trash” a progress bar comes up that says to delete 17,009 files. When it reaches this number, it freezes to a grayed screen displaying the message” You need to restart the computer. Hold down power button fore several seconds or press the restart button.” So i just restart my computer, and can never delete my trash.

Hi!

I have evidently done the absolute no-no of attempting to clear space on my external by manually deleting old back ups in finder. I’ve begun to try and put the back ups back where they were in order to delete them properly but I don’t know if this is going to do anything because now the space on the external is down to about 10GB with something like 3,000,000 items that were in the trash. What should I do? Even if this copy works, I really don’t know how to properly do this. I’m also quite nervous to restart my machine because I am now without actual back-ups! Ahh… this has become such a disaster, it seems like you have the solution.. PLEASE HELP!! Thanks!!

did the sudo and worked like a charm! thank you!

Thanks worked first time and saved me a real hassle

was deleting old Time Machine back up files from hard drive via Finder (never gonna do that again!) We had no problem doing this with quite a few TM back up files, yesterday. This morning I resumed the deletion of files to make room on the external HD, but the trash can won’t empty. Error code 8003

I have tried opening the Trash, right click and select “put back” but I get the following error message:

“The operation can’t be completed because backup items can’t be modified.”

There are two files in my Trash:

both are folders located at: /Volumes/MAC TERRA/.Trashes/503

I have tried using Trash It, but no luck.

Also tried to use disk utility – first aid but I’m not sure what to do here. I selected our external HD (MAC TERRA) and clicked on verify disk and after it ran, got message that drive appears to be okay. Also, noticed that while I am running the disk utility for the ext HD (MAC TERRA) the trash can on the desktop bar appears empty!

However, If I run disk utility on our Mac HD the trash can shows up full again? Also, when I run “verify disk permissions” on our Mac HD (option greyed out for ext HD) I do get a long list of permissions that show up, but I’m afraid to click “repair permissions” because this is a hackintosh and I have no idea if permissions are set up different for a hackintosh versus a regular mac?

I have also tried the “Secure Empty Trash” idea, but doesn’t work. Same error message :(

Any advice on what to do would be appreciated! Also, need it in “for dummies” terms since I am not a MAC whiz ;)

Sydney,

I think you’re screwed. I’ve had this bite me more than once. Apple dropped the ball on this one (you shouldn’t be allowed to trash files/folders if it is going to hose your operating system’s performance.

I’ve never found a way to get around this other than reformatting the drive. YOU’LL LOSE EVERYTHING ON THE DRIVE when you do.

I made the mistake of moving Time Machine’s target drive to my external data drive when my original Time Machine drive croaked. My offsite backup provider has decided they won’t allow an external drive to have any time machine files on it (even if they are excluded from their backup).

Major pain in the behind. Macs are becoming more like MS Windows everyday. I’m growing tired of it. :(

If you’re brave, you can look at http://www.thexlab.com/faqs/trash.html
and at least get the other files out of your trash. But I eventually think you’ll have to reformat that Time Machine drive to eliminate the empty trash errors.

The option key did it for me thanks!

I tried almost all of these, even Trash IT! didn’t work. (I’d stupidly moved some Time Machine backups to the Trash from an external HD).
I just ejected the external drive and the trash emptied immediately. was actually a simple fix, and of course I’ll use Time Machine to delete backups going forward. Lesson learned. but thanks for your help.

I have two items that wont delete out of my trash. Their called “±Ê!␀␀␀.␀␀␀” and “y¨â€`©ò.ÂÐv”.
tried force emptying, terminal trickery, unlocking, and renaming, with no luck. :/

Best working solution given by Dez Miklos at the following link–works very well–takes a few minutes but fixes the problem.

http://forums.cnet.com/7723-6126_102-365518/trash-refusing-to-empty-comes-up-with-error-code-8003/

Have Something To Say? Join The Discussion!

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