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?
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.
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.
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.
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.
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.
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.