RSS



How to delete stuck folders and files from your trash in Ubuntu

Tue, Aug 5, 2008

Linux, Technology, Ubuntu, howto

Talk about it in our Forums

How to delete stuck folders and files from your trash in Ubuntu

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: , , , , , ,

Popularity: 4% [?]

Share and Enjoy:
  • Digg
  • del.icio.us
  • MisterWong
  • Reddit
  • Technorati
  • BlinkList
  • Facebook
  • Fark
  • Mixx
  • Slashdot

This post was written by:

arsgeek - who has written 1989 posts on ArsGeek.


Contact the author

19 Comments For This Post

  1. Chad D Says:

    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.

  2. budi Says:

    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!

  3. Ajay Says:

    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

  4. Dan Says:

    Thanks, worked on Ubuntu 8.04 64bit also using sudo rm -Rf *.

  5. aakostas Says:

    thanks, it’s very helpfull for me!!!

  6. MEK Says:

    Thanks, I couldn’t find where those files were hiding!

  7. Aan Says:

    Woi ………… Mod” bisa pake bahasa indo aja dak ….. hikz

    Help donks nih ……. trash -1000 bikin Ilfil !!!!!!!!!!!!!!! –”

  8. Paranoid Says:

    sudo rm -Rf *

    To beginners like me, that could spell trouble.
    Rather advise : sudo rm -rf /home/YOUR-USER-NAME/.local/share/Trash/files/*

  9. Paranoid Says:

    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

  10. tule Says:

    Thanks. Great tip.

  11. kanel Says:

    thanks alot with your tips.!

  12. tor Says:

    Thanks.
    Stucked files are Nuked…

    tor

  13. ubuntu Says:

    Or you can actually make a shortcut on desktop with those commands…

  14. Click here Says:

    Whoa, fantastic article you got here! I’m so happy I found this. I’ve been looking for something like this for a while! I send my positive thoughts that more people read this! =]

  15. Notorik Says:

    Thanks. I’m using Debian and it worked great.

  16. Kary Batteiger Says:

    I’m not sure why but this blog is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later on and see if the problem still exists.

  17. mortgage calculator Says:

    Oren Bitan (Morrison & Foerster), Twanna A Hines, moderator (funkybrownchick.com), Corynne McSherry (EFF), Elena M. Paul, Esq (Volunteer Lawyers for the Arts)

  18. CheatRFTerbaru Says:

    Cheat RF Online Terbaru (All Server)

  19. Discover Fournel Says:

    nice share gan!! :D
    wa juga mau share nih, tapi belum pernah coba sapa tau ada bisa kasih review http://mycheatrf.blogspot.com/

Leave a Reply