Trash won't empty

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

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

1 Like

Yes - no resolution to the issue

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

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

1 Like

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

1 Like

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

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/

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.

1 Like

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.

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?

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.

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

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
1 Like

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.

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.