How to remove all trash from the trash with the teminal

To force-remove all the trash from the trash with the terminal write (all capitals are important):


cd ~/.local/share/Trash/files

To force remove a directory:


rm -r -f <the directory you want to remove from the trash>

To force remove a file:


rm -f <the file you want to remove from the trash>

I hope that helps anyone who can’t empty their trash.

Hi,

I will move this to the Unreviewed HOWTO section, since this does not belong in the Install-Boot-Login one.

Furthermore I did some editing to your post. It contained some wrong info, such as:
no “/” for “home”, write “~/” if you don’t want the username to show.
no need to become root, the Trash folders are owned by the user.

Please, only post suggestions like this one, if you’re really sure about their correctness.

how do I do that?

What do you mean? Just to make sure: no hard feelings, you’re very welcome here, appreciating you’re trying to help others. But being unable to empty the trash from Dolphin, can be solved with Dolphin. Open Dolphin, double click in the address bar to show the ‘path’, add “.local/share/Trash/files” through typing and choosing from the dropdown, and you’re there. If you take a look on the files in there, you’ll see they belong to the logged in user, so no need to su.

All this and your network post, make me feel you want a lot, you will get there too, but not all at once from scratch.

What do you mean? Just to make sure: no hard feelings, you’re very welcome here, appreciating you’re trying to help others.
I meant how do I change the category of the thread.
Also that way will just make the file go into the trash again which isn’t very helpful. Another way to use the command


rm -f

Is to force delete a file without it going into the trash can. Also the command can be used under “su” to delete a file in your home directory that has it’s permissions messed up, then again you can change that with dolphin super-user mode. Honestly I had no Idea that you could do it without the “su”, I just use the terminal always as the root.:slight_smile: Also I had no idea you could change someone else’s post.

stephenmac7 wrote:
> a file in your home directory that has it’s permissions messed up

how did your home’s permissions get messed up?


palladium

I think it had to do with my networking issues… The name of the file was ~/Documents/%H, I fixed it