Results 1 to 6 of 6

Thread: how can i empty trash bin as root

  1. #1
    Join Date
    Jul 2007
    Location
    Mexico!!
    Beans
    79
    Distro
    Ubuntu 8.04 Hardy Heron

    how can i empty trash bin as root

    hi, i want to know how to empty the trash bin as root because when i want to empty the trash bin some files are kept and i get the message that i dont have the permission, i know i can change the permissions of that files, but i would be easier if i can just know how to empty the trash bin as root, thanks guys.

  2. #2
    Join Date
    May 2006
    Location
    Tallahassee, FL
    Beans
    327
    Distro
    Ubuntu

    Re: how can i empty trash bin as root

    In terminal

    Code:
    sudo rm -rf /home/YOURUSERNAME/.trash

  3. #3
    Join Date
    Jul 2007
    Location
    Mexico!!
    Beans
    79
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: how can i empty trash bin as root

    hey thanks guitarocker!!

  4. #4
    Join Date
    Feb 2007
    Location
    Melbourne
    Beans
    799
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: how can i empty trash bin as root

    Quote Originally Posted by GuitarRocker2562 View Post
    In terminal

    Code:
    sudo rm -rf /home/YOURUSERNAME/.trash
    That is for earlier versions. In Hardy Heron, you need to do this:

    Code:
    sudo rm -rf ~/.local/share/Trash
    You should also empty root's trash, just in case:

    Code:
    sudo rm -rf /root/.local/share/Trash
    In additional, any extra partitions you have mounted will have their own trashcans for each user who has deleted files on that partition. I, for instance, have to do the following to clear that out:

    Code:
    sudo rm -rf ~/Files/.Trash*
    Quote Originally Posted by malanco View Post
    hey thanks guitarocker!!
    To thank him, click on the thank icon on his post.

  5. #5
    Join Date
    Jul 2007
    Location
    Mexico!!
    Beans
    79
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: how can i empty trash bin as root

    ok, trash folder is at /.local so my the command looks like this :

    sudo rm -rf /home/YOURUSERNAME/.local/share/Trash/files


  6. #6
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: how can i empty trash bin as root

    Please be very careful when entering any of those commands into the terminal. Mess up and you can end up removing a lot more than what's in your trash.

    If you decide to use those commands, I highly suggestion you copy and paste instead of retype.

    Probably the safest thing to do is
    Code:
    sudo chown -R username /home/username/.local/share/Trash/files
    and then empty the trash the traditional way.

    I suspect people are getting root-owned files in the trash because they're running graphical applications with sudo instead of gksudo. If you're getting a lot of root-owned files in the trash, read this link: http://www.psychocats.net/ubuntu/graphicalsudo

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •