Mac Trash won't empty, and rm ~/.Trash/* does nothing

3

1

The Trash icon on my Dock shows the Trash containing files. I tried right-clicking and Empty Trash, but it still shows files there.

When I open the Trash folder in Finder, I can see several files still there.

I tried manually emptying the Trash with rm ~/.Trash/*, but that doesn't work. In fact, ls ~/.Trash/ shows the folder being empty!

I tried Force Quitting Finder, but that didn't help either.

I'm sure rebooting would fix the problem, but I'd prefer a solution that didn't require rebooting.

Specs:

  • Mac OS X 10.8.2 Mountain Lion
  • MacBook Pro mid-2009

mcandre

Posted 2013-01-03T02:42:42.877

Reputation: 2 696

1did you try logout and login? – John Siu – 2013-01-03T03:01:42.013

@JohnSiu I've got programs running that I'd rather not kill. Upvote nevertheless. :) – mcandre – 2013-01-03T04:26:29.340

Try restart spotlight(OS X indexing service). – John Siu – 2013-01-03T04:49:31.400

Are the ghost files on another volume? Files moved to the trash from the startup volume go in ~/.Trash; files on other volumes go in /Volumes/<volume name>/.Trashes/<your user ID #>/ instead. – Gordon Davisson – 2013-01-03T18:29:21.520

Answers

4

Rebooting doesn't help. I used Disk Utility.app to try to repair the USB drive. It turns out the file system is corrupted; only backing up my files, reformatting, and restoring my files fixes the .Trashes folder on the drive.

The Seagate also forcibly disconnects when the cable is jiggled; Hardware issues likely caused the file system corruption in the first place.

mcandre

Posted 2013-01-03T02:42:42.877

Reputation: 2 696

1

If a file is IN-use while you trashed the app from finder, the trash won't delete it so quit the app then try again..

edit: try holding option key while emptying the trash

if thats not working try:

Open a terminal.
cd
cd .Trash
rm -fr . (or rm -fr * )
exit

Open Disk Utilities

Repair permissions

read this: as i had this problem so long ago

and to solve it I did something that you'd never think would solve the problem, but for some reason it did. I opened up the trash, did a Cmd-A to select all, then a Cmd-I to find out how (collectively) big all of these files were and when my Mac tried to access the files to see their size, they disappeared

maybe its worked for you ;) let me know

Arash

Posted 2013-01-03T02:42:42.877

Reputation: 678

I repeat, variations of rm does not fix the problem; ls doesn't even show any files being in .Trash. – mcandre – 2013-01-03T16:48:46.907

do you try Super Empty Trash?I would suggeste restarting, personally. Or relaunching Finder – Arash – 2013-01-03T17:26:46.720

Restarting Finder doesn't help. – mcandre – 2013-01-04T15:07:00.930

1

Are these trash items by chance from an external drive? Or a backup? If so, try:

cd /Volumes ls cd <> ls -a sudo rm -rf .Trashes

heyang

Posted 2013-01-03T02:42:42.877

Reputation: 11

Can you give an explanation on how that command works? Two line answers are generally not a good format for SU. – Doktoro Reichard – 2013-10-22T14:48:55.073

1

Does not require rebooting? Here how it's done.

There are multiple trash in the system. Even your external has it's own '.Trash' directory. Hence, some lock folders from other disk may not be able to be deleted even with the 'option' key is pressed.

Then how?

  1. Go to your common trash finder on desktop
  2. Right click the stubborn file/folder -> 'Get Info'
  3. Under 'General', take note or copy the 'where' path
  4. open terminal [command+space, type "terminal"]
  5. type: sudo rm -R PATH_TO_THE_STUBBORN_DIRECTORY
  6. It will ask to override... type y for yes and enter.

Boom!

AFwcxx

Posted 2013-01-03T02:42:42.877

Reputation: 148