Empty Ubuntu Gnome Trash from the Command Line by ruchi · December 27, 2006 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)
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
Trolling us here? Windows 98, Windows ME, Windows 2K, Windows XP xD
Thanks! I had tons of files in there
right click trash, empty
——- another time
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
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.
$ cd ~/.local/share/Trash
$ sudo rm -rf expunged/*
$ sudo rm -rf files/*
$ sudo rm -rf info/*
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.
$ 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