Every now and again, I’ll find myself with some files sitting around in my trash that I can’t delete. This can be particularily problematic when I’ve got several gigs worth of stale ISOs sitting there giving me an error like
Error removing file: Permission denied
I like computers but I’m not a big fan of when they talk back. So here’s a quick and easy way to go into your system and nuke those files.
First, open up a terminal session (Applications-> Accessoris ->Terminal)
Now, type this:
cd /home/YOUR-USER-NAME/.local/share/Trash/files
Typing ‘ls’ at this point should reveal to you the folders and files you’re trying to delete. Now on to the nuking. If it’s just a few files, this will do:
sudo rm -f *
If it’s files, folders and files within folders, try this:
sudo rm -Rf *
No more stuck stuff in your trash.
Technorati Tags: linux, ubuntu, trash, stuck, howto, geeks, computers















August 17th, 2008 at 12:23 pm
I will say thanks for this, as I had some folders in my trash I couldn’t empty because of permissions errors. I will also point out this isn’t Ubuntu specific as I run Arch Linux and it worked perfectly.
August 22nd, 2008 at 5:25 am
Hi there.
The problem i run into is slightly different, there’s no file existed in the /home/YOUR-USER-NAME/.local/share/Trash/files directory. But when i have 1 or 2 files in the trash and try to empty trash, i got the real trash files emptied first, then the Trash Can talk back saying ” Cannot empty 1 of 20 files” whereas there’s not anymore trash file in it. any clue? thanks anyway!
September 2nd, 2008 at 1:13 pm
really it did me a gr8 favr..thanx bud
i’ve got a prob too..i,ve got a folder named MS-OFFICE2007..which seems to be lockd some how..plz tell me hw do i remove it..
thanx a lot
September 28th, 2008 at 4:15 am
Thanks, worked on Ubuntu 8.04 64bit also using sudo rm -Rf *.
October 29th, 2008 at 4:13 pm
thanks, it’s very helpfull for me!!!
December 16th, 2008 at 10:23 pm
Thanks, I couldn’t find where those files were hiding!
December 19th, 2008 at 6:37 am
Woi ………… Mod” bisa pake bahasa indo aja dak ….. hikz
Help donks nih ……. trash -1000 bikin Ilfil !!!!!!!!!!!!!!! –”
January 30th, 2009 at 5:04 am
sudo rm -Rf *
To beginners like me, that could spell trouble.
Rather advise : sudo rm -rf /home/YOUR-USER-NAME/.local/share/Trash/files/*
January 30th, 2009 at 5:12 am
Yeah, I saw the “cd /home/YOUR-USER-NAME/.local/share/Trash/files”
But I hate Reading TFM, so me just “rm -fr * .”
Rather be explicit about the files you want to delete or whatever. And you must never ever do a “rm -fr *” without doing a “pwd” first.
Oh, well that is just my 2 cents worth of opinion.
Lanton
February 23rd, 2009 at 8:53 pm
Thanks. Great tip.
May 27th, 2009 at 3:19 am
thanks alot with your tips.!