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

Michaelgtrusa

macrumors 604
Original poster
Oct 13, 2008
7,900
1,821
I've seen several vids on youtube explaining how to delete using the terminal. The claim, this way will get more hd space back. Has any one used this method?
 
You might want to be be little more expansive in your question. What "method" are you talking about?

To delete something using Terminal, it's just the "rm" command. Not like it's a big mystery or anything. Any space savings using that versus Trash from the GUI are negligible. Both essentially accomplish the same thing.
 
I've seen several vids on youtube explaining how to delete using the terminal. The claim, this way will get more hd space back. Has any one used this method?

Might want to provide a link to one of these claims. The only difference, that I'm aware of, between deleting a file from within terminal and from within the OSX GUI is that the former does not put the file in the trash bin... it simply deletes it forever.
 
Well, that was painful. :D

It's still the same thing either way, and the video implies--incorrectly--that the rm command deletes the file, when it in fact does not. It removes the directory entries for files (just like Empty Trash), and "frees up" the same space, even though the original data still resides on the disk. Empty Securely overwrites the filespace and removes the directory entry, but again, does not "delete" data from a drive.

In fact, if you think about it logically, it's physically impossible to truly delete data--that is, removing it from a drive--once written to for the first time. All you can ever do is continually overwrite the same blocks with something else.
 
I've seen several vids on youtube explaining how to delete using the terminal. The claim, this way will get more hd space back. Has any one used this method?

Once you empty the trash bin, there is no difference. I doubt there is a command which magically creates more space when deleting a file xxx bytes in size, wtf.
 
Not to mention that if you are not careful doing rm from terminal you can delete a lot more than you thought you would. When you enter commands at terminal, you are at the Unix command line, which even people with years of experience at it have been known to muck things up.
 
Not to mention that if you are not careful doing rm from terminal you can delete a lot more than you thought you would. When you enter commands at terminal, you are at the Unix command line, which even people with years of experience at it have been known to muck things up.

Which is why it is a good idea to put.

Code:
alias rm="rm -i"

In your ~/.bashrc to have it ask to confirm removing of the individual file(s), then you can always use rm -f some_file(s) to skip the question(s) if your sure what you are doing is correct.
 
The only difference, that I'm aware of, between deleting a file from within terminal and from within the OSX GUI is that the former does not put the file in the trash bin... it simply deletes it forever.

Trash is basically just a front end for "rm." You can recover things deleted via Trash (unless you use Secure Empty Trash) or rm, but it takes special software.
 
rm -rf /
;P this method saves you more space than any other!

disclaimer: dont try it.. although its suppose to have protection against it, i for one am NOT willing to try it on mine.. :D
 
Trash is basically just a front end for "rm." You can recover things deleted via Trash (unless you use Secure Empty Trash) or rm, but it takes special software.

Of course. My point was that deleting a file in the gui just simply moves it to a folder, in your home directory, called ~/.Trash, instead of removing it like rm does. I wasn't sure if the OP knew that only doing the former (without emptying the trash) doesn't actually recover hard drive space.
 
Since i'm not well educated on this method, I will not use it. I'll use cleanapp and then secure delete.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.