Emptying the trashcan in CLI

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Emptying the trashcan in CLI

Postby viking60 » 24 Oct 2014, 00:02

If you are using openbox or another Window manager you might not have the trashcan in your panel. So deleting a lot of files will not free up your space because you still have the data in your trashcan.
To remove it in CLI:
:A

Code: Select all

rm -rf ~/.local/share/Trash/*
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
Snorkasaurus
Berserk
Posts: 587
Joined: 30 Dec 2013, 19:19
Contact:

Re: Emptying the trashcan in CLI

Postby Snorkasaurus » 24 Oct 2014, 02:55

On my bare Wheezy/OpenBox machine I needed a file manager anyways and Thunar was one of the smallest (at a whopping 130M including dependencies) and it provides easy access to "Trash". I wish it would allow for viewing both tree and bookmarks at the same time but it'll do for now. :-)

S.

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Emptying the trashcan in CLI

Postby viking60 » 24 Oct 2014, 08:28

Yes Thunar (or Pcmanfm) will handle it.
On one of my boxes that I use as server I do not use any GUI at all - only tmux, to save the juice for serving.
In those cases the CLI method comes in handy.
But when I access the server via SSH i could start Thunar remotely and empty the trashcan

Code: Select all

ssh -X viking@viking-server

and start Thunar

- so yes; that is an easier way to do it
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Tips & Tricks”