Trash won't empty


(Robert Tallitsch) #1

I have been unable to empty the trash on my Mac Pro (Mac OS 10.13.4) for some time now. I use the “Empty Trash” command on Finder and the progress bar appears indicating how many files are being moved and time remaining. But the process stalls, regardless of how long I allow it to run. (Longest is in excess of 36 hours). I am unable to empty anything from the trash. Suggestions?

Thanks

Bob


(Adam Engst) #2

Have you tried using Disk Utility and clicking the First Aid button? Perhaps there’s some directory corruption that’s causing issues.


(Robert Tallitsch) #3

Yes - no resolution to the issue


(cdevers) #4

If you’re comfortable with Terminal, you could always cd ~/.Trashes ; rm -rf *.

(Note: probably unwise to do this without caution…)


(Ray Kloss) #5

Have you tried to restart? The other thing is to start up with the Shift key held in case some app is using the trash, empty the trash and then restart as usual.

Also

https://support.apple.com/en-us/HT201583


(Robert Tallitsch) #6

I have tried both restarting as well as restarting with the shift key held - and neither has worked.


(Fritz Mills) #7

You might want to try Cocktail. It has a force-empty trash function. It isn’t free, but you can use it 10 times in demo mode. Also, it’s on sale right now for $19, so if you do want to buy it, now is a good time.

http://www.maintain.se/cocktail/


(Neil Laubenthal) #8

This article from iMore tells you how to get rid of untrashable items…

https://www.imore.com/how-force-empty-trash-your-mac-using-terminal

I’ve used it to get rid of pesky files that insist they’re still in use before. IIRC there used to be a way to Force Empty Trash from Finder but it was years back. Pathfinder will also do it…at least it would the last time I looked at Pathfinder…but the terminal trick in the iMore article works fine.


(Adam Engst) #9

I think you held down the Option key when emptying the Trash. Would be worth a try again, though I don’t have high hopes for it working.


(@lbutlr) #10

The fact that it progresses and never finishes is concerning. Normally you will get an error that certain items could not be deleted.

Do you have external drives? Is the trash empty if those drives are not connected?


(James R Cutler) #11

When using Terminal.app to delete files or folders, delete one file or folder at a time. This is often less confusing and also isolates files with particular errors that prevent deletion.

It is possible that a glitch can put a bad character in a file or folder name that even the rm cannot handle. Such a bad file is rare and will only be deleted by erasing the enclosing volume.


(Robert Tallitsch) #12

The files are a combination of files from my SSD, external hard drives, and on-site backup drive. Approximately 350+ items


(James R Cutler) #13

Robert,

Try:

  • Disconnect all external drives.
  • Empty Trash on SSD.
  • For each external drive:
    • Connect the external drove
    • Empty Trash on the external drive
    • Unmount and disconnect the external drive

(@lbutlr) #14

You can delete any file, regardless of how tricky the name is, by accessing its node number.

ls -il #shows the inode
find . -inum <inode> -delete

The find command may vary depending on your version of find, some will require that you do -exec rm {} \; instead, but it’s been awhile since i found an find that didn’t understand -delete.


(James R Cutler) #15

Neat Trick.

The last time I even used the term inode was in describing a talk by Dennis Ritchie at a DECUS National Symposium. I wish I had known this trick earlier. But then, I have only discovered one file in my entire career that rm could not delete.