Force Empty Your Trash
Hey guys, this mad kids are non. Today I'm going to show you how to force empty your trash through terminal efficiently.
Now, some of you might have had the problem where you have so much stuff in your trash that might take hours to delete and empty your trash, or where you can't actually empty your trash and it just sits emptying for hours and hours, but it never actually empties. I'm going to show you how to permanently empty your trash efficiently through terminal.
First of all, you want to open up terminal or your terminal application, whatever it may be. Okay, so now, if you just deleted a file that, say, on your desktop that won't erase and it's on your hard drive, then it should be in that trash.
So if you type CD
space or just type CD
and hit enter, then you type CD
space .trash
with the capital T, then you hit enter. Then, if you type LS
, if there's something in your trash, that means that there's a file in there.
I'll just create a file right there. Okay, and say you can't delete that file for whatever reason. All you want to do, now that you're in the trash, is you want to type sudo
and you don't have to type sudo
, but I prefer to, space RM
space -RFS
space *
, then you hit enter.
And then you type in a password if you have done a sudo command. Now, if you type LS
, everything is gone, except for .
and ..
. If you take a look, okay? So now, that's how to delete things if you deleted them on your own computer.
Now, say you deleted a huge file on another hard drive, like this time machine backups. There's a directory on every other hard drive that you plug in that's a Mac hard drive called .trashes
. So, first of all, you want to type CD(𝑠) CD
space and then drag the hard drive into your terminal.
We know what hit enter. Now type LS
in terminal. So now, right now this will be all the files on your hard drive. Type LS
. Now you can see all the hidden ones too. There should be one called .trash
. If there isn't, then there's no trash there. So I'm going to type CD
space .trashes
.
Okay, now I'm just in .trashes
, so it doesn't let me read right now. If I type ls
, permission is denied, so I have to type sudo LS
. Okay, so right here’s this folder called 501. It can be, it might be whatever it is, but um, I'll just prove it's a directory.
So, if you type CD
, or I'm just going to do sudo -s
, login as root, but I'm in the same place, so I'm going to type CD 501
.
Okay, now if I do LS
, there's nothing in here, but if I have deleted anything, like a file on my Time Machine disk, then I don't have permissions to delete. Look right now, let me delete that one. Okay, maybe it will, but whatever.
So if I want to delete, I just type RM
space -RF
space *
. Since I'm already logged in as root, it works, but if you don't have root access, you can't delete or empty the trash on other volumes or hard drives through terminal.
But, like I said, I just type sudo space -s
, login as root, but it will ask you for your password normally. So that's how I got in as root and did that.
So I'll just review one more time: to delete stuff in your own trash, CD
space .trash
, hit enter, RM
space -RF
space *
, and you can also put a sudo
in there.
To delete things on other volumes, you type CD
space, drag the volume or hard drive in from wherever, and then you type CD
or sudo space -s
, then you can go see CD
space .trashes
with the capital T, and then you can just type RM
space -RF
space *
or CD
to the directory inside of there to get specific files.
So that's how to easily empty your trash through terminal. Unfortunately, so thanks for watching backhands-on. Please subscribe and goodbye...