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

bretts75

macrumors newbie
Original poster
Nov 16, 2014
3
0
In moving large amounts of photos around I managed to fill my hard drive and my trash is also very full. I've tried every way to delete trash but all I get is the spinning beach ball. I'm realizing I most likely will need to do this with at the terminal.

I've tried both:
sudo rm -rf ~/.Trash/*
and
rm -rf ~/.Trash/*

Both times I get the respone: Argument list too long.

What can I add to my terminal line to address this. It's likely that I have a lot of files in my trash bin.
 

bretts75

macrumors newbie
Original poster
Nov 16, 2014
3
0
should I use the line with sudo or without? With sudo it pops up with a warning and asks me to ask password. I'm ok typing that but want to make sure I'm not missing something first
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,280
4,964
Shouldn't need sudo.

If that fails (probably will if previous examples did):

Code:
cd ~/.Trash
find . -type f -exec rm -f {} \;

Will be a bit slow, but will get it done. At that point, if anything left, should be small enough amount of stuff Finder delete won't choke on it.
 

bretts75

macrumors newbie
Original poster
Nov 16, 2014
3
0
If you get access denied errors, then use sudo.

thanks. I did and used .jpg, .cr2, .doc, .docx, .pdf. Which should cover most of the files. Still get the Argument list too long if I use just *. Also still can't use my normal finder trash delete options.

Any other thoughts to try?

----------

Shouldn't need sudo.

If that fails (probably will if previous examples did):

Code:
cd ~/.Trash
find . -type f -exec rm -f {} \;

Will be a bit slow, but will get it done. At that point, if anything left, should be small enough amount of stuff Finder delete won't choke on it.

thanks. trying this now.

----------

thanks. I did and used .jpg, .cr2, .doc, .docx, .pdf. Which should cover most of the files. Still get the Argument list too long if I use just *. Also still can't use my normal finder trash delete options.

Any other thoughts to try?

----------



thanks. trying this now.

ok. great. At least got my trash bin to empty. I hoped this would free up hard drive space ( i also deleted a lot of synced files in dropbox) but I still have the spinning wheel with using finder and can't access my hard drive. I can't even open it to delete more stuff. According to disk utility I'm full. Unforunately I didn't pay enough attention and Lightroom filled my drive. We'll see what I can do with this now.
 

ssls6

macrumors 6502a
Feb 7, 2013
593
185
I always just do this

rm -rf ~/.Trash

The folder gets recreated
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.