Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Gregg2

macrumors 604
Original poster
May 22, 2008
7,266
1,237
Milwaukee, WI
I have hundreds if not thousands of locked files in the Trash that I want to Empty. I found the following instructions to do this (but it doesn't seem to be working - unless I just need to wait longer). Can someone confirm this process, or suggest another way?

How to Force Empty Trash Bin on a Mac Using Terminal?​

On your desktop, look for a magnifying glass at the top right-hand side corner to bring up Spotlight.

  • Type Terminal to launch Terminal on your Mac.
  • Enter the below-mentioned command on Terminal without pressing Enter afterward
  • Sudo rm -R
  • While typing the command, make sure there should be space after R to make the command work.
  • Now Control-click on Trash icon to launch it.
  • Select all the files present in the Trash bin folder.
  • Drag and drop the files into Terminal Window.
  • Hit Enter.
  • To execute the command, enter your admin password. Hit enter again.
Note: when you will enter the password into Terminal, you will not see the password being typed.

Read Also : How to Restore Your Mac With Time Machine

Thus, you can force empty into the trash bin. The process might take a little bit more time if there are large files in Trash.
 
Last edited:

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,013
It’s faster if you delete the whole Trash folder ;)
Code:
sudo rm -r ~/.Trash
 

Gregg2

macrumors 604
Original poster
May 22, 2008
7,266
1,237
Milwaukee, WI
I did try that, but it didn't work. Maybe I didn't wait long enough. I'll give it another go. No dragging from Trash to Terminal, I assume…
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,013
If there is something you do not want to delete from Trash, drag it out.
In Terminal, copy-paste the line below and press Return. It will delete the folder Trash for the current logged user. The folder will be recreated next time you move something to Trash.
Code:
sudo rm -rf ~/.Trash
Be careful to copy-paste the whole line, as the files/folders deleted in this way can’t be recovered.
About rm https://www.oreilly.com/library/view/macintosh-terminal-pocket/9781449328962/re10.html
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.