Trash in GNOME is generally handled in Nautilus file browser. Trash icon’s context menu provides shortcut to empty trash. But while working in command line, you may not prefer to empty trash by going to Trash icon in panel or file browser.
In older version of GNOME, the trash folder is in .Trash folder in your home directory (~/.Trash). But in current version (2.30) it is ~/.local/share/Trash/. It has two sub folders called files and info. The files folder contains the files deleted and info directory consists of meta data for each deleted file.
Here is an example:
$ cat ~/.local/share/Trash/info/style.org.css.trashinfo[Trash Info]Path=/home/blackgod/Desktop/style.org.cssDeletionDate=2010-06-01T09:59:18
How to empty trash is straight forward now. Just delete the content of Trash folder – Check the below command snippet for more clarification.
$ rm -rf ~/.local/share/Trash/*
Warning: Be careful while using rm -rf command, so as not to delete other files.
Using trash-cli tool:
Install trash-cli tool, which manages the trash in command line which is equivalent to Trash functionalites in Nautilus fire browser. It acts upon the Trash directory we have mentioned above.
It can be installed with,
$ sudo apt-get install trash-cli
It installs three commands,
1. list-trash to list down the files in trash
2. trash to move the file to trash
3. restore-trash to restore the file to original path
The below console session is an example of its capability.
$ trash voice-message.wav
$ list-trash
2010-06-07 23:20:41 /home/blackgod/Downloads/voice-message.wav
$ trash ubuntu-10.04-desktop-i386.iso.torrent
$ restore-trash voice-message.wav0 2010-06-07 23:22:21 /home/blackgod/Downloads/ubuntu-10.04-desktop-i386.iso.torrent1 2010-06-07 23:20:41 /home/blackgod/Downloads/voice-message.wavWhat file to restore [0..1]: 1
$ list-trash2010-06-07 23:22:21 /home/blackgod/Downloads/ubuntu-10.04-desktop-i386.iso.torrent
1. HOWTO: Automatically regulate the size and age of your Trash folder
2. How to limit Trash folder size using quota
I believe this post won’t go to trash, may be useful to some one

Pingback: Deleting Command Line rm Moves File to Trash Instead | 3StrandsOfHair
Well, it just works! THX a lot!
Pingback: Manage Trash from the Command Line in Ubuntu | Fourth Iron
I really appreciate what you post here, very fresh and intelligent. One thing though, I’m running Firefox on Fedora and some of your content are a little off. I know it’s not a common setup, but it’s still something to to keep in mind. Just tossing you a heads up.
I really appreciate what you write about here. We try and read it every day so keep up the good writing!
In Arch linux, installing trash-cli, makes the following commands available:
trash-empty trash-list trash-put trash-restore
Pingback: [SOLVED] How to manage Trash from command line in GNOME (delete, list, restore and empty) - xBlurb