View Full Version : OSX Trash
Mar 12, 2002, 01:30 PM
Can anybody give me a quick way to empty the trash from the terminal?
I have about 7000 files which take about 10gb of disk space up on my pb and I want to get rid of them, but I do not own them!
I guess the terminal can do this (Root didn't work!)
Mar 12, 2002, 01:49 PM
I don't know abou the Terminal but there's a shareware/freeware app called BatChmod (look on versiontracker) that has a "Force Empty Trash" command built in. Hope this helps!
Mar 12, 2002, 02:01 PM
Just switch to root you will own all and should be able to delete everything from the trash. If you are not confortable with being root, just empty the trash and logout.
Mar 12, 2002, 02:16 PM
Just cd to the .Trashes directory on the volume you want to empty the trash from. The directory is on the root level for the volume that OS X is installed on. In the .Trashes directory you should see user folders named by the user id number (501, 502, etc). If you are the only user, you'll only see one. cd into the numbered directory (ls to make sure its the right directory--look for the stuff you have to delete) and then sudo rm everything. Like this:
%sudo rm -rf *
Be careful with the sudo rm command as you can trash your system with it. To be safe close the terminal window after the command has successfully completed.
I'm typing this from memory, BTW.
Mar 12, 2002, 02:53 PM
Originally posted by Mighty Mac
Just switch to root you will own all and should be able to delete everything from the trash. If you are not comfortable with being root, just empty the trash and logout.
I am happy with the root user name, infact my life would be hell without it (I love fiddling with the OS) but the Root does not list the trash for my admin user name.
Thanks for everyones help!