The recycle bin is a tool that in any operating system it plays a very important role. In OSX it will not be less and that is why today we are going to explain a new aspect of it that you may not know.
As you know, in OSX you can empty the trash in two different ways, one simply by clicking on it and saying empty and filly previously configuring and emptying safely. Nevertheless, for advanced users we will discuss a third way today which makes use of the Terminal tool.
This post is not aimed at knowing how to empty the recycling bin itself, since that is an intuitive gesture that the most common of mortals already know. The fact is that as an OSX user you can see yourself in the situation that a certain file cannot be deleted due to security problems or because it is being used by a certain application. Surely you have tried to close all the applications and you see that the problem persists. In these cases, you will not be able to empty the trash if you do not restart the system, so if you do not want to be turning off and on the computer, the option you have left is to empty it through the Terminal tool. It is true that to be able to use the Terminal you must have more programming knowledge, but when you have a post like today's one where we indicate exactly what command to use, things become child's play.
For empty trash from Terminal, the steps you have to follow are the following:
- We access the Terminal tool, either through Launchpad, OTHERS folder or by calling it through SpotLight from the Finder.
- Once inside the Terminal we are going to write the following command:
sudo rm-fr ~ / .Trash / *
- We press enter to execute the command. The system will ask us for the user password and we press enter again.
Keep in mind that if you have the trash open, no matter how much you use this command, the process will fail. You have to have the trash can window closed.
UPDATE: The article has been updated and the command being offered has been found to work perfectly.
Good info! Thank you!
Note that the command is incorrect, it must be:
sudo rm -fr ~ / .Trash / *
NO SPACES, since when executing "rm -fr ~ / Trash / *" it will delete our home directory (~), then the root (/) (ouch!), Then a file or directory called Trash in $ PWD, then the root again (/) and then whatever it finds (*).
How do I know? They are an OS X user who comes from Linux which I have used for many years.
Thank you! Error when formatting the text of a word file to wordpress. Solved
I should never have read this post, I followed the instructions in the image with space, thanks for not correcting the image now I have deleted my home, I have not slept all night, how do I restore my life if I am new and do not configure time machine
What would it have cost you to change the image? Of course, with articles like this you better dedicate yourself to something else. Thank you very much for wasting readers time.
Of course, the fault is not yours, but of those of us who have blindly trusted what you write and the images that accompany the text.
In my case, you have won over a former reader who will never speak well of this page.
regards
Ouch, and how do I restore it?
Dear Matias. I just dd execute the command you indicate to delete the trash, because it is not allowed, and I have not achieved anything. Still as is. ????
Hello, first of all thanks for the information, I have two files that come from a hard drive (when I eject it they go from the trash) that there is no way to delete them, I have used this command and others that are on the internet and I have tried using programs like CleanMyMac which has a trash delete option and there is no way to delete them.
Can you tell me how I could empty the trash with those two folders on the hard drive?
CMD + Right Click = Empty Trash Safely.
then it is:
1. sudorm -fr ~ / .Trash / *
2. sudo rm -fr ~ / .Trash / *
3. sudo rm-fr ~ / .Trash / *
I cannot empty the trash and I would like to try this option.
Don't even try, I followed what this post said and ended up in the technical service with all my irrecoverable information, I lost everything.
ignore those imbesiles who know nothing more than scrub your mac
none of those codes delete the trash more than delete your important files
I can't empty my trash on the Apple
as I have to use the keyboard to empty it. I have used the finder but it does not work
JAJAJAJAJAJA the equivalent of "delete windows32 if you want more ram" on mac hahahahaha
How I deleted the files from the trash was:
1.-In the trash file I gave Command i to see the information and I was able to verify in which memory the After files were created. that are hidden.
2.On a Windows computer identify the hidden Trash files and delete them.
3. Insert the usb back into my mac and they no longer appear.
I hope it helps you.