Empty Ubuntu Gnome Trash from the Command Line Posted on December 27, 2006 by ruchi 67 Comments Sponsored Link Ubuntu has a trash can/recycle bin feature similar to windows. The difference with Ubuntu is that you can empty the trash from the command line. First you need to open your terminal and type the following command rm -rf ~/.Trash/* Related posts Working with Songbird and wma files (3) Workaround for Feisty screensaver bug (6) Windows NTFS Partitions Read/write support made easy in Ubuntu Feisty (47) Winamp Presets for your XMMS Music Player (16) Widescreen Resolutions for Intel Display Cards In Ubuntu Feisty (5) What to Expect from Ubuntu 8.04 (Hardy Heron) (29) What package is that file in ? (1) 67 thoughts on “Empty Ubuntu Gnome Trash from the Command Line” « Older Comments worked like a charm, perfect ^^ you can empty a windows trash can from commandline too 😛 I have a file named 810_98ME2KXP_v1.6 in my trash can and when I empty the trash can this file doesn’t get deleted neither it gets restored. It just stays as it is with the same error all the time 810_98ME2KXP? Trolling us here? Windows 98, Windows ME, Windows 2K, Windows XP xD Thanks! I had tons of files in there xbmcbuntu eden gksudo nautilus right click trash, empty “not permission” ——- another time gksudo nautilus right click trash empty greyed out created a text file in /home of root from nautilus. moved to trash. click on trash to see it in trash, but nooooo The folder contents coulid not be displaed. Sorry, could not display all the contents of “trash”: Operation not supported I have 3 gigs free disk space. The trash is holding me hostage like a union: it does not work as desired, it impairs functionality, and apparently cannot be removed easily. How can I remove the union gremlins (assassinations, torture, genocide…it’s all on the table NOW) AND empty the trash as the above command doesn’t work either!?!?! $ ls -al ~/.Trash total 8 drwxrwxr-x 2 frakunions frakunions 48 2012-08-17 00:51 . drwx—— 45 frakunions frakunions 1742 2012-08-30 21:09 .. [xbmcbuntu eden is so foobared up I’m going to DBAN the drives, install Mint 13, then xbmc] I found the trash in ~/.local/share/Trash. [code] $ cd ~/.local/share/Trash $ sudo rm -rf expunged/* $ sudo rm -rf files/* $ sudo rm -rf info/* [/code] Open the trash again and press F5 – it should now be empty. I used sudo because you can empty items into the trash you don’t normally have permission to delete. Nautilus will ask you to authenticate, and then the items will move into the trash. However, once there, you can’t empty them from the trash. Truing to run nautilus using sudo doesn’t work to empty the trash. For some reason, nautilus doesn’t recognize trash:///, computer:///, or any similar virtual directory when run using sudo. If there are multiple users, you may need to empty those manually as well. [code] $ for f in /home/*; do t="$f/.local/share/Trash"; if [ -d "$t" ] ; then for g in expunged info files; do sudo rm -rf "$t/$g"; done; fi; done [/code] « Older Comments Leave a comment Cancel reply Your email address will not be published. Required fields are marked *Comment Name * Email * Website Save my name, email, and website in this browser for the next time I comment.